Cost of goods sold (COGS) is a crucial part of any business both in terms of finance and marketing. If you wonder how to calculate the cost of goods sold, search no more. In this article, we’ll show you how COGS is calculated, and how the value of COGS metric is determined by a specific set of elements.
According to a recent QuickBooks survey, rising costs are the single greatest challenge for nearly half (46%) of all small businesses. Getting a clear picture of your COGS is the first step toward controlling those costs and setting a pricing strategy that ensures you’re not just busy, but profitable.
To aid the understanding of COGS in your businesses, we’ll provide a helpful example when showing the COGS formula.
Last but not least, we’ll review the benefits as well as limitations of COGS metrics to give a full picture of the use of COGS in your business.
TL;DR
- COGS = Beginning Inventory + Purchases – Ending Inventory.
- It covers only direct production costs: materials, labor, and manufacturing overhead, not marketing or admin expenses.
- COGS appears on your income statement directly below revenue; gross profit is revenue minus COGS.
- Your inventory valuation method (FIFO, LIFO, or weighted average) directly affects the COGS number.
- A high or rising COGS signals it’s time to review pricing, suppliers, or production efficiency.
What is COGS?
Cost of goods sold is a key financial metric that is essential for any business, especially when it comes to marketing. COGS represents the direct cost associated with the production or acquisition of a product. It is important to understand COGS as it helps determine the profitability of a product and assists in developing effective marketing strategies.
Learn how to analyze financial data for ecommerce businesses and SaaS.
Why is COGS important for your business?
COGS plays an essential role in marketing, representing the direct costs associated with producing or acquiring a product, and it’s critical to understand this metric as it helps determine the profitability of a product.
Profitability
When calculating COGS, businesses take into account the cost of raw materials, labor, manufacturing overheads, and shipping. By understanding cost of goods sold, businesses can calculate the gross profit margin by subtracting the COGS from the sale price of the product. This metric is important for marketing as it provides insight into the financial performance of a product and its potential for profitability.
Optimal price point
Knowing the cost of goods sold is momentous for pricing a product optimally. By understanding the costs associated with a product, businesses can determine the optimal price point that will ensure that the profit margin is maintained while also being competitive in the market. Setting the right price point can have a significant impact on a business’s revenue and profitability.
Budgeting
COGS is also important for budgeting marketing activities. By calculating the profit margin, businesses can determine how much they can afford to spend on marketing activities to drive sales and boost revenue. Understanding cost of goods sold can help businesses make strategic decisions about which products to promote or invest in, depending on the profit margins they offer.
The COGS formula
Every accountant should be able to recite the COGS formula in their sleep. At its core, it uses three variables:
COGS = Beginning Inventory + Purchases – Ending Inventory

Here’s what each component means:
- Beginning inventory – the value of stock you had at the start of the accounting period. This number should match the ending inventory from your previous period.
- Purchases – all inventory bought or manufactured during the current period, including raw materials, direct labor costs, and any other production-related purchases.
- Ending inventory – the value of unsold stock remaining at the end of the period. This is subtracted because you haven’t sold those goods yet, so their cost shouldn’t be counted.
The logic is straightforward: you start with what you had, add what you bought, then back out what’s left. What remains is the cost of everything you actually sold.
Check out an article on how to create an effective inventory management system.
What items are included in COGS?
The calculation involves the following direct costs:
- Determine the cost of all the materials and supplies needed to produce a product.
- Add the cost of labor, including any wages or salaries paid to employees who contributed to the production process.
- Include any overhead costs associated with production, such as rent, utilities, insurance, and depreciation.
- Add the cost of shipping and handling for the product.
A useful test: if the cost wouldn’t exist if no products were produced, it likely belongs in COGS. On the other hand, selling, general, and administrative expenses (SG&A), such as marketing costs, management salaries, and office supplies, are not included in cost of goods sold, they appear separately on the income statement.
Calculating COGS examples
Example 1: Retail business
Suppose a clothing store starts the year with $30,000 in inventory. During the year, it purchases $50,000 in new stock. At year-end, $20,000 worth of clothing remains unsold.
COGS = $30,000 + $50,000 – $20,000 = $60,000
The store’s cost of goods sold for the year is $60,000.
Example 2: Manufacturing business
Suppose a company manufactures and sells T-shirts. The company incurs the following costs in producing and delivering the T-shirts:
- Cost of raw materials, such as fabric and thread: $5,000
- Cost of labor: $2,000
- Overhead costs: $1,000
- Shipping and handling: $500
Using the formula above, we can calculate cost of goods sold as follows:
COGS = Cost of raw materials + Cost of labor + Overhead costs + Shipping and handling
COGS = $5,000 + $2,000 + $1,000 + $500
COGS = $8,500
So, the cost of goods sold for the T-shirts produced by this company is $8,500.
Now let’s apply the inventory-based formula to that same manufacturer. If they began the period with $3,000 in raw materials and work-in-progress inventory, purchased $7,000 in new materials, and ended the period with $1,500 in inventory still on hand:
COGS = $3,000 + $7,000 – $1,500 = $8,500
Both approaches confirm the same result , which is exactly what you’d expect.
Inventory valuation methods: FIFO, LIFO, and weighted average
When you’re calculating COGS, the numbers you plug into the formula depend on how you value your inventory. And that choice matters more than most people realize – different methods produce different COGS figures and affect your tax liability and reported profit differently.
FIFO (First In, First Out)
FIFO assumes that the oldest inventory items are sold first. Since older stock typically costs less (prices tend to rise over time), FIFO usually results in a lower COGS and a higher reported gross profit. It’s the most common method and the one accepted under both US GAAP and IFRS.
Example: You buy 100 units at $10 each, then another 100 at $12 each. You sell 100 units. Under FIFO, COGS = 100 × $10 = $1,000.
LIFO (Last In, First Out)
LIFO assumes the most recently purchased inventory is sold first. This typically produces a higher COGS and lower taxable income during inflationary periods. However, LIFO is only permitted under US GAAP and is not allowed under IFRS, so international businesses can’t use it.
Example: Using the same figures above, LIFO COGS = 100 × $12 = $1,200.
Weighted average cost
The weighted average method calculates the average cost of all inventory items available for sale, then applies that average to units sold. It smooths out price fluctuations and is well-suited to businesses with large volumes of interchangeable goods.
Weighted average cost per unit = Total cost of goods available ÷ Total units available
Whichever method you choose, apply it consistently. Switching methods mid-stream requires IRS approval and can significantly distort your financial comparisons over time.
Where to find COGS on your financial statements
If you’re not generating COGS yourself but need to find it for analysis, reporting, or review, here’s where to look:
On the income statement (profit and loss statement), COGS appears as the second line item, directly below total revenue. Gross profit – the figure everyone wants to maximize – is calculated by subtracting COGS from revenue:
Gross Profit = Revenue – COGS
For example:
- Revenue: $200,000
- COGS: $80,000
- Gross Profit: $120,000 (60% gross margin)
On your balance sheet, unsold inventory (which will eventually become COGS when sold) sits under current assets. When inventory is sold, its cost moves from the balance sheet to the income statement as COGS.
In accounting software like QuickBooks, COGS shows up on your profit and loss report under “Cost of Goods Sold.”
COGS tracking can also be automated if you’re using Synder to sync sales data from Shopify, Amazon, Stripe, or other platforms, COGS. Synder maps product costs and quantities directly into your accounting software, so the income statement reflects accurate COGS without manual calculation.
Want to see it in action? Start a free trial or book a demo to see how Synder keeps your COGS accurate across all your sales channels.
Read more about COGS tracking and sales management.
What insights can be drawn from the COGS metric?
As mentioned above, cost of goods sold is a critical financial metric for any business, and it can provide valuable insights into a company’s financial performance. Here are some insights that can be drawn from the COGS metric:
- Profitability: COGS is a measure of the direct costs associated with producing or acquiring a product, and it’s a pivotal component in calculating a company’s gross profit margin. By subtracting the COGS from the revenue generated from the sale of a product, a business can determine the profit margin. This metric provides insight into the profitability of the product, and whether it’s generating enough revenue to cover the cost of production.
- Efficiency: COGS can also provide insight into the efficiency of a company’s production processes. If the COGS is high, it can indicate that the company is inefficient in producing or acquiring a product, and there may be opportunities to optimize the production process to reduce costs and increase profitability.
- Pricing: COGS is important in determining the optimal price point for a product. By understanding the direct costs associated with a product, a business can set the right price that will ensure that the profit margin is maintained while also being competitive in the market.
- Product mix: COGS can help businesses make strategic decisions about which products to promote or invest in. By analyzing the profit margins of different products, businesses can identify the products that offer the most significant revenue potential and allocate resources accordingly.
The COGS metric provides valuable insights into a company’s financial performance, and it’s a crucial component in financial management and marketing strategy. By understanding the COGS, businesses can determine the profitability of their products, optimize production processes, set the right price point, and make strategic decisions about product mix.
What are the limitations of the COGS calculation method?
While the cost of goods sold (COGS) calculation is a useful metric for businesses, it has some limitations that should be taken into account. Here are some limitations of the COGS calculation method:
- Limited scope: The COGS calculation only takes into account the direct costs associated with producing or acquiring a product. It doesn’t consider other indirect costs such as marketing, administrative expenses, and research and development costs. As a result, businesses may underestimate the actual cost of a product and the true profit margin.
- Complex production processes: In some industries, the production process can be complex, with several stages involving different raw materials, labor, and overhead costs. It can be challenging to determine the cost of each stage accurately, and it can result in an inaccurate COGS calculation.
- Inventory accounting methods: The COGS calculation can vary depending on the inventory accounting method used. For example, if a business uses the first-in, first-out (FIFO) method, the COGS will be different from the last-in, first-out (LIFO) method. This can result in different profit margins and financial performance metrics.
- Timing of expenses: The COGS calculation is based on the expenses incurred during a particular period. However, there may be a time lag between the actual expenses and when they are recorded, which can result in an inaccurate COGS calculation.
To obtain a more accurate picture of a company’s financial performance, businesses should consider other financial metrics in addition to COGS and take into account the limitations of the COGS calculation.
How to calculate COGS: Closing thoughts
COGS formula is a vital part of a proper business management strategy. It carries a strong informative value for the goods your company sells. While COGS metric can direct your production process, purchases strategy, and other major expenses, it has its limitations. Bear them in mind when drawing conclusions and putting them into practice.
We hope that by providing you with the COGS formula and useful example you will be able to calculate the value of COGS and use this information to grow your business further.
Want to learn more? Explore Is The COGS is an Expense.
FAQ
What is the COGS formula?
The standard COGS formula is: COGS = Beginning Inventory + Purchases – Ending Inventory. It captures the cost of all goods actually sold during the period, excluding items still in stock.
How do I find cost of goods sold on my financial statements?
COGS appears on your income statement (also called the profit and loss statement) directly below total revenue. Gross profit is calculated by subtracting COGS from revenue. In most accounting software like QuickBooks or Xero, COGS is a line item in your Profit and Loss report.
What’s included in COGS?
COGS includes direct costs only: raw materials, direct labor, manufacturing overhead, and production-related shipping. It does NOT include indirect expenses like marketing, sales salaries, rent, utilities, or administrative costs. These operating expenses are recorded separately.
What is a good COGS ratio?
It depends heavily on the industry. A software company might have a COGS ratio (COGS as a percentage of revenue) below 20%, while a grocery retailer might operate closer to 70–80%. The key benchmark is gross margin: the higher the gross margin, the more revenue remains after covering production costs to fund operations and profit.
Does COGS affect taxes?
Yes. COGS is a deductible business expense that reduces your taxable income. A higher COGS means lower reported profit and, consequently, a lower tax bill for that period, which is one reason why choosing the right inventory valuation method matters.
Can service businesses calculate COGS?
Technically, pure service businesses don’t have COGS in the traditional sense since there’s no inventory. Instead, they report “cost of revenue” or “cost of services,” which covers direct costs like labor and tools tied specifically to delivering the service. The concept is the same, but the label is different.