Pricing and profit

COGS formula: the cost of goods sold explained

Your margin is only as true as your cost numbers. Here's the COGS formula, what counts for a product brand and a worked example you can copy.

8 minute read · Updated October 2026

In short

The COGS formula is opening stock plus purchases minus closing stock. The answer is what the stock you actually sold cost you, including freight and duty to get it into your warehouse. Take COGS away from sales and you have gross profit, the number every pricing and buying decision starts from.

What is COGS?

COGS stands for cost of goods sold. It's the cost of the products you sold in a period. Only those products.

It's not what you spent on stock this month. If you bought 1,000 candles and sold 600, only the 600 are in COGS. The other 400 are still sitting on the shelf as stock, which is an asset until they sell.

That one idea clears up most COGS confusion. Spending on stock and the cost of goods sold are different numbers. They can be miles apart in a busy buying month.

What is the COGS formula?

You need three numbers for the same period: the stock you started with, what you added and what was left at the end.

Formula

COGS = opening stock + purchases minus closing stock

  • Opening stock is the value of stock on hand at the start of the period, at cost. It's the same number as last period's closing stock.
  • Purchases are the stock you bought or made during the period, at cost, including the costs of getting it to you (see the next section).
  • Closing stock is the value of stock left at the end of the period, at cost.

Value everything at cost, never at retail price. If you value stock at what you'll sell it for, your COGS comes out wrong and so does your margin.

How do you calculate COGS step by step?

  1. Pick the period. A month, quarter or financial year. Use the same period you report sales for.
  2. Find opening stock at cost. Take last period's closing stock figure.
  3. Add up purchases at cost. Supplier invoices for stock, plus inbound freight, duty and the other costs listed below. Leave out GST if you're registered for GST, because you claim it back.
  4. Count closing stock and value it at cost. A stocktake gives you the units. Multiply each product by its unit cost.
  5. Run the formula. Opening stock plus purchases minus closing stock.
  6. Sense check it. Divide COGS by sales. If the answer jumps around a lot from one month to the next with no reason you know of, check the count and the unit costs.
With nozi

Know your stock value without a spreadsheet.

nozi reads your stock, sales and margin from Shopify, so you can see what's on hand and how each product is earning before you close the month.

See how nozi works

What counts in COGS for a product brand?

COGS includes every cost of buying or making your products and getting them to where you sell from. For a brand that imports stock, that's your landed cost per unit.

The ATO's guidance on valuing trading stock at cost backs this up. It says cost includes "all costs associated with bringing the stock to its current condition and location". It adds that this may include the cost price plus freight, insurance, customs and excise duties and delivery charges (ATO).

Usually in COGS:

  • The supplier's price for the finished product
  • Raw materials and trims, if you make the product yourself
  • Production labour, if you pay people to make the product
  • Packaging that is part of the product, like a jar, box or swing tag
  • International freight and insurance to get stock to you
  • Customs duty and import clearance charges
  • Local delivery from the port or airport to your warehouse

Usually not in COGS:

  • Marketing and ads
  • Your Shopify plan and apps
  • Rent, office costs and wages for people who don't make the product
  • Payment processing fees

Shipping orders out to customers is the grey area. Many brands track it separately as a selling cost so they can see it clearly. Whatever you choose, do it the same way every period. Check with your accountant how it should sit in your accounts.

What's the difference between COGS and expenses?

COGS moves with sales. Expenses mostly don't.

Sell twice as many products and your COGS roughly doubles. Your rent, your software and most of your wages stay the same. That's why accountants list COGS first, straight under sales. Operating expenses come further down.

The split matters because each one answers a different question:

  • COGS tells you if your products make money on their own.
  • Expenses tell you if the business makes money once you add the cost of running it.

A brand can have healthy product margins and still lose money because expenses are too high. Or it can have low expenses and still struggle because the products barely cover their own cost. You can only see which problem you have if you keep the two apart.

Worked example: a skincare brand calculates its quarterly COGS

A small skincare brand wants its COGS for July to September. It's registered for GST, so every figure below excludes GST.

ItemAmount
Opening stock at cost, 1 July$18,000
Product purchases from its manufacturer$24,000
Freight and insurance to Australia$1,800
Customs duty and clearance charges$600
Boxes and labels for the products$1,200
Closing stock at cost, 30 September$16,500

Formula

COGS = $18,000 + ($24,000 + $1,800 + $600 + $1,200) minus $16,500

Example

Purchases come to $27,600. So COGS is $18,000 + $27,600 minus $16,500 = $29,100.

The brand sold $72,000 of products in the quarter, excluding GST.

  • Gross profit: $72,000 minus $29,100 = $42,900
  • Gross margin: $42,900 ÷ $72,000 = 59.6%

Notice what happens if the brand forgets freight, duty and boxes. Purchases drop to $24,000, COGS drops to $25,500 and gross margin looks like 64.6%. That's five points of margin that isn't real. Prices set on that number would be too low.

The same thinking works per product. The brand's best-selling serum costs $8.20 from the manufacturer. Add $0.60 of freight, $0.20 of duty and $0.40 for the box and the true unit cost is $9.40. That's the number to price from.

Does stock valuation change your COGS?

Yes. Closing stock is part of the formula, so the way you value it moves COGS.

The ATO lets you value each item of trading stock at the end of the year using one of three methods: cost, market selling value or replacement value. It also says you can choose a different method each year for different items of stock (ATO).

Here's why that matters. Say you hold dead stock you'll only clear at half price. Valued at cost, it sits on your books as if it'll earn its full value. Valued at a lower market selling value, closing stock drops and COGS goes up. Your margin for that period looks worse, but it's closer to the truth. Talk to your accountant before you change methods.

The order you assume stock sells in also affects unit cost when prices change between batches.

How often should you calculate COGS?

Monthly suits most small brands. It's often enough to catch a cost increase before it eats a whole season's margin.

You don't always need a full count each month. Many brands do a full stocktake at the end of the financial year and use their stock records in between. The ATO has simpler trading stock rules for eligible small businesses: if your aggregated turnover is under the limit and you estimate the value of your stock changed by $5,000 or less in the year, you may not have to do a formal stocktake (ATO). Check with your accountant whether you qualify.

Common COGS mistakes

  • Counting all stock bought as COGS. Only stock sold counts. The rest is still stock.
  • Leaving out landed costs. Freight, duty and clearance belong in unit cost.
  • Valuing stock at retail. Always value at cost.
  • Including GST when you claim it back. If you're registered, keep GST out.
  • Forgetting write-offs. Damaged, lost or stolen stock reduces closing stock. Record it so your COGS is real.
  • Changing what's in COGS each month. Pick your rules and keep them, or you can't compare one period with the next.

How nozi helps

nozi connects to your Shopify store and reads your stock, sales and margin for you. It shows which products are earning their keep and which are slowing, then tells you the move with the numbers behind it. When you make a change in nozi, it pushes through to Shopify, so you're never updating two places.

With nozi

See your margin on every product.

nozi shows sales and margin product by product, so a cost rise shows up before it costs you a season.

See how nozi works
FAQ

COGS questions, answered

What is the formula for cost of goods sold?−

Opening stock plus purchases minus closing stock. Value all three at cost for the same period. The result is the cost of the stock you sold.

Is COGS the same as cost of sales?+

They're often used to mean the same thing. Some businesses use cost of sales more widely, to include selling costs like shipping orders out. Check how your accountant sets up your accounts and stay consistent.

Is shipping included in COGS?+

Inbound shipping is. Freight and insurance to get stock to you are part of what it cost to bring the stock to where you sell it. Shipping orders out to customers is usually tracked separately as a selling cost.

Is COGS an expense?+

It's a cost that sits in your profit and loss, but it's listed apart from operating expenses. COGS goes up and down with sales. Operating expenses like rent and software mostly don't.

Does COGS include GST?+

Not if you're registered for GST. You claim the GST back as a credit, so you work COGS out excluding GST. If you're not registered, the GST you pay is part of your cost.

Still wondering? Email support@nozi.com.au or get in touch

Start your free trial

Stop guessing. Start knowing.

Clarity on every product. Confidence in every decision.

Pop your email in to apply. Founding Brands get six months free.

Thanks. You're on the list.
That didn't go through. Please try again.

No lock-in contract • Cancel anytime

nozi knows.