Knowing how to calculate the cost of goods sold can help you set prices and measure the efficiency of your production.
Read on to learn about the COGS formula, its components and how to calculate cost for your small business.
What is cost of goods sold (COGS)
COGS shows the cost of producing or acquiring the goods you sell. COGS only includes direct costs โ the exact costs tied to creating your product.
The simple formula for gross profit is:
Sales revenue โ cost of goods sold = gross profit.
If your business creates a product for $10 in direct materials and direct labour and sells it for $15, your COGS is $10, and your gross margin is $5.
What costs are not included in COGS?
COGS excludes indirect costs and indirect expenses โ think admin expenses, advertising, distribution costs, shipping costs, freight costs, storage costs and management salaries.
These things are classified as operating expenses or operational costs on your financial statements.
Only direct materials, direct labour costs and direct overhead costs are included in your COGS calculation.
How do you calculate COGS?

The cost of goods sold COGS formula is:
Beginning inventory + purchases during the period โ ending inventory = COGS
This is sometimes called the goods sold formula.
Your beginning inventory is the closing inventory carried over from the previous period. Items purchased includes all raw materials, stock or physical products bought during the same period.
Ending inventory is whatโs still unsold at the end of the accounting period.
Cost of goods sold example
Letโs say a retail business starts the financial year with an inventory worth $2,000. During the year, they buy $5,000 in additional stock. At year end, the closing inventory is $1,000.
Using the COGS formula: $2,000 + $5,000 โ $1,000 = $6,000. The cost of goods sold for that period is $6,000.
Once you know COGS, calculate gross profit, which would be sales revenue minus $6,000.
There are plenty of goods sold calculator options online. Or itโs even easier to use accounting software to track inventory value, the purchase date of each item and other costs automatically.
What are the components of COGS?
- Direct materials: The actual cost of raw materials or wholesale products used to create what a company sells. This is the base cost in any business model involving physical products.
- Direct labour: The direct labour costs for workers involved in production. Doesnโt include indirect labour, such as managers or admin staff.
- Direct overheads: Other costs directly tied to production, like equipment maintenance, factory utilities and additional costs on the production line.
Sales costs, marketing and management salaries arenโt part of COGS. They are indirect expenses and are included in your operating expenses on the income statement.
What inventory valuation method should you use?
Your inventory valuation method affects how you calculate the cost of goods sold. You can use FIFO (first in, first out), LIFO (last in, first out) and the average cost method.
The FIFO method assumes that the oldest inventory items are sold first, which can lead to lower COGS during inflation.
The LIFO method assumes that the most recently acquired inventory is sold first, which can lead to higher COGS during inflation.
The average cost method smooths out price fluctuations by averaging the costs of goods available for sale during the period.
Your chosen accounting method also affects your companyโs inventory value on the balance sheet and the actual cost reported on your loss statement.
Speak with your accountant for advice on which method will best suit your business model.
Top tip: Different inventory valuation methods, such as FIFO, LIFO, and average cost, can affect COGS and reported profits.
Why does COGS matter for your business?
COGS directly influences your gross profit, profit margins, and net income. A lower COGS means more gross margin and more money to pay for operating expenses, fixed costs and to fund growth ambitions.
High inventory turnover โ where inventory is sold quickly โ indicates strong production efficiency and healthy sales.
Tracking COGS also helps with income tax reporting, since COGS lowers your assessable income on your financial statements.
For services sold rather than physical products, the equivalent is cost of services sold. It includes direct labour and other costs tied to delivering the service.
Use inventory accounting tools and profit and loss templates to track your COGS and financial reporting. Good COGS management supports pricing decisions and helps you understand your true production costs throughout the financial year.













































