Cost of goods sold (COGS) is an acronym you might see on your business’ balance sheet or financial statements. The metric is important—it ensures profitability and helps you accurately report business expenses to the government correctly.
However, considering that many small business owners lack enough knowledge about accounting and finance, it's a good idea to understand how COGS can impact sales and tax liability.
While the COGS formula might look technical initially, this guide will walk you through what's included in COGS, how to calculate it, and different ways to help prepare for tax season.
What is the cost of goods sold?
Cost of goods sold (COGS) is the direct cost of producing products that your business sells. Also referred to as "cost of sales," COGS includes the cost of materials and labor directly related to the production of retail products.
What is the cost of goods sold formula?
The cost of goods sold formula is: (Beginning inventory + purchases) — ending inventory.
What’s included in the cost of goods sold calculation?
The cost of goods sold is essentially the wholesale price of each item, which includes the direct labor costs incurred to produce each product.
This includes:
- The individual costs of all parts used to build or assemble the products
- The cost of all the raw materials needed for the products
- The cost of any items purchased for resale and/or to create the product
- The parts or machines required to create the product
- All supplies required in the production of the product
- The people who put the products together and ship the parts
- Shipping parts and equipment to the warehouse to create the product, including containers, freight, and fuel surcharges
COGS vs. operating expenses
Operating expenses and cost of goods sold are two different types of business expense that occur in your daily business operations. They are both subtracted from your business’s total sales figures, yet they are recorded as separate line items on your income statement.
Operating costs refer to expenditures not directly related to the production of your products. These include:
- Rent
- Office supplies
- Legal costs
- Sales and marketing
- Payroll
- Utilities
- Insurance
For example, a fashion boutique must pay rent, utilities, and marketing costs no matter how many items it sells in a month. When the boutique sells a shirt, the COGS formula accounts for the sewing, the thread, the hanger, the tags, the packaging, and so on. It also includes any goods bought from suppliers and manufacturers.
How to calculate cost of goods sold
1. Determine direct costs vs. indirect costs
When calculating the COGS formula, it's important to remember that each product has two types of costs: direct and indirect.
Direct costs are all sales costs directly associated with the product itself. This includes:
- Raw material costs or items for resale
- Inventory costs for the finished products
- Supplies for the production of the products
- Packaging costs and work in process
- Supplies for production
- Overhead costs, including utilities and rent
Indirect costs include:
- Labor, the people who put the product together
- The equipment used to manufacture the product
- Depreciation costs of the equipment
- Costs to store the products
- Administrative expenses and salaries
- Non-production equipment for back-office staff
A note on facilities costs: This part is tricky and requires an experienced accountant to accurately assign each product. These costs need to be divided strategically among all the products being manufactured and warehoused, and are usually calculated annually.
2. Choose an inventory valuation method
The most popular inventory valuation methods are:
- Weighted average cost. In this method, the average price of all products in stock is used to value the goods sold, regardless of purchase date. It’s an ideal method for mass-produced items, such as water bottles or nails. To find the weighted average cost COGS, multiply the units sold by the average cost.
- First in, first out (FIFO). Assets produced or purchased first are sold first. This method is best for perishables and products with a short shelf life. When prices rise, higher-cost goods are sold first, and the closing inventory is higher. This results in higher net income over time. When prices are decreasing, the opposite is true.
- Last in, first out (LIFO). This method assumes the goods you purchased or produced last are the first items you sold. When prices rise, goods with higher costs are sold first, and the closing inventory is lower. This results in a decreasing net income. During times of inflation, LIFO leads to a higher reported COGS on your financial statements and lower taxable income.
Whoever prepares your taxes should advise you on what inventory accounting method you should use for your business.
3. Figure out beginning inventory and cost of purchases
Whether you sell jam, t-shirts, or digital downloads, you’ll need to know how much inventory you start the year with to calculate the cost of goods sold. Total of all the products purchased during the fiscal year that are available to sell, including raw materials, minus anything taken for personal use.
Beginning inventory doesn’t simply include finished products in stock and ready for resale, but also all the raw materials you have, any items that have been started but not completed, and any supplies. This should match the ending inventory for the previous fiscal year.
Further, whatever items and inventory are purchased throughout the year that don't fall under the beginning or ending inventory must also be accounted for. These are the cost of purchases and include all items, shipments, manufacturing, etc. As with your taxes, you must keep all paperwork showing these items were purchased during the correct fiscal year.
4. Calculate ending inventory
At the end of the year, take stock of all the remaining inventory—this means all products that remain and have not been sold. This information will be used in the current COGS calculation and will also be required for the following year's calculations.
All ending inventory can be categorized as one of the following:
- Resale ready
- Damaged (requires the estimated value of the items damaged)
- Worthless products (evidence of destruction must be provided)
- Obsolete items (evidence of devaluation needed). These products can be donated to charities for a little extra goodwill.
5. Apply the COGS formula
Once you’ve calculated your inventory at the start and end of your reporting period, here is the accepted COGS formula used by accountants:
(Beginning Inventory + Purchases) – Ending Inventory = COGS.
💡 Pro tip: Shopify makes it easy to find your cost of goods sold at the end of your calendar year—no manual calculations or formulas required. To get started, go to the Finances summary report from your Shopify Admin and select the time period you want the report to reflect.
Cost of goods sold example
Here’s a COGS example to demonstrate the calculation: Your company has the following information for recording the inventory for the calendar year ending on December 31, 2023. Your inventory at the beginning of the year is $20,000. At the end of the year, your ending inventory is $6,000. During the year, your company made $8,000 worth of purchases throughout the reporting period.
You can calculate COGS using the formula above: ($20,000 + $8,000) - $6,000, making your COGS $22,000.
How to use the cost of goods sold calculation
Determine profitability
The COGS calculation helps you determine the profit you make on each sale, understand which products are most profitable, and help you set the best price. This ultimately helps you make smarter inventory decisions that reduce carrying costs, prevent obsolete inventory, and maximize space.
Optimize inventory
With an efficient inventory management system, you can reduce storage costs and minimize wastage, reducing COGS. This can assist with purchasing, stocking, and production decisions.
Keep track of expenses
A product requires materials and parts. Not to mention the fixed costs: the labor, factory overhead, rent, equipment, electricity to run the operations, employees to sell said products in your store, as well as sales, marketing, and finance.
These are all expenses that contribute to the end cost of the product—expenses you need to keep track of to ensure that you are making a healthy gross profit and that you can accurately price products and keep healthy margins.
Manage tax liability
The IRS allows you to deduct the cost of goods used to make or purchase the goods you sell in your business.
By calculating all business expenses, including COGS, the company ensures they are offsetting them against total revenue come tax season. This means the company will only pay taxes on net income, thereby decreasing the total amount of taxes owed when it comes time to pay taxes.
Bear in mind that while high COGS means a lower income tax, that is not the ideal scenario, because it ultimately also means lower profitability for the company. It's important to manage COGS efficiently to increase profits.
Use the COGS formula for your retail store
Whether you’re opening your first retail store or your fifth, the accounting process is tough. Business owners can’t control the price of each other’s suppliers. But what you can control is the accounting methods you use to track metrics like COGS.
Be thorough in your accounting practices. Partnering with a good accountant can improve your small business, not just by taking the headache out of tax preparation and COGS formulas, but by providing financial advice that improves your bottom line.
Read more
- Cash on Delivery: How To Guide for Retail Businesses
- Discount Strategy in Retail: How to Offer Discounts & Markdowns Without Slashing Profits
- How to Calculate the Value of Your Inventory
- Retail Metrics: 16 Key Metrics for Your Store
- ABC Analysis: How to Analyze Product & Inventory (2024)
- Penetration Pricing Strategy: Definition, Advantages, and Examples
- How LIVELY's Omnichannel Approach Increased Average Order Value by 80%
- A Guide To The Detection and Prevention of Vendor Fraud
- How To Grow Your Business: A Guide to Expanding Retail Operations Profitably
- Vision Board for Business: Use This Creative Tool to Accomplish Your New Year’s Resolutions
Cost of Goods Sold FAQ
Is COGS the same as purchase price?
Purchase price is the direct costs associated with a product. COGS, however, includes all direct and indirect costs—including staff salaries, machinery, and shipping costs.
What is another name for the cost of goods sold?
Cost of goods sold is sometimes referred to as “cost of merchandise sold” or “cost of sales”. Both are a calculation that shows the total cost of producing a product, including both direct and indirect costs.
How is the cost of goods sold calculated?
The cost of goods sold formula is: (Beginning Inventory + Purchases) – Ending Inventory.
What is included in COGS?
The COGS formula includes both direct and indirect costs, including machinery and tooling, raw materials, packaging, and labor costs.
Who uses the cost of goods sold?
All businesses use the cost of goods sold calculation to determine profitability. The bigger the gap between your COGS and the sale price, the more profit your business makes.
Is COGS an asset or expense?
COGS is an expense on a company’s balance statement because it’s the total money you’ve spent while manufacturing or sourcing a product.