How to Calculate Cost of Goods Sold (COGS): A Simple Guide

Key Takeaways COGS is the direct cost of the products you actually sold during a period. The core formula is Beginning Inventory + Purchases − Ending Inventory. COGS includes dir...

How to Calculate Cost of Goods Sold (COGS): A Simple Guide
Key Takeaways
  • COGS is the direct cost of the products you actually sold during a period.
  • The core formula is Beginning Inventory + Purchases − Ending Inventory.
  • COGS includes direct costs only — not rent, ads, or office salaries.
  • The inventory method you choose (FIFO, LIFO, or weighted average) changes your COGS and your taxes.
  • Your COGS drives the two numbers that matter most: gross profit and gross margin.

You just closed a strong sales month, but your bank balance does not show it. So where did the money go? For most small businesses, the answer starts with one number many owners never calculate correctly: Cost of Goods Sold (COGS).

Get COGS right and you will know your true profit on every sale, price your products with confidence, and file cleaner taxes. Get it wrong and you are guessing. This guide breaks it all down — the formula, two worked examples, inventory methods, margin benchmarks, pricing math, and practical ways to lower your COGS.

What Is Cost of Goods Sold (COGS)?

Cost of Goods Sold is the total direct cost of producing or buying the goods your business sold during a specific period — a month, a quarter, or a year.

The key word is direct. COGS answers a simple question: how much did the items you actually sold cost you to make or acquire? It appears near the top of your income statement, right below revenue, and it is subtracted from sales to reveal your gross profit.

Note the word sold. Inventory you bought but did not sell is not COGS yet — it stays on your balance sheet as an asset until it leaves the shelf.

Why COGS Matters for Your Business

COGS is not just an accounting formality. It quietly shapes almost every financial decision you make:

  • Profitability — it is the first cost subtracted from revenue, so it sets the ceiling on how much you can keep.
  • Pricing — you cannot price for profit until you know what each unit truly costs.
  • Taxes — COGS is a deductible business expense that lowers your taxable income.
  • Financing — lenders and investors read your gross margin to judge whether your model works.

In short, a clean COGS number turns guesswork into a decision you can defend.

What Is Included in COGS (and What Is Not)

Typical costs that belong in COGS include:

  • Raw materials and components
  • Inventory or finished products you bought to resell
  • Direct labor used to make the product
  • Inbound freight and shipping to get inventory in
  • Packaging that is part of the product

This is also where many owners go wrong. COGS covers only the direct cost of the product. Everything else that keeps the business running is an operating expense (OpEx).

Belongs in COGSOperating Expense (not COGS)
Raw materialsRent and utilities
Direct production laborMarketing and ads
Inbound freight on inventoryOffice salaries and admin
Product packagingSoftware subscriptions

Why it matters: mixing OpEx into COGS makes your product look unprofitable, while leaving real costs out makes it look better than it is. Keep the line clean and consistent every period.

The COGS Formula

The standard formula is short and works for almost any product business:

COGS = Beginning Inventory + Purchases − Ending Inventory

Here is what each piece means:

  • Beginning Inventory — the value of unsold stock you started the period with.
  • Purchases — new inventory or materials you bought during the period.
  • Ending Inventory — the value of stock still on your shelf at the end.

COGS Example #1: A Product Maker

Imagine you run a small online candle shop. Over one month, your numbers look like this:

ItemAmount
Beginning Inventory (candles & materials)$2,000
Purchases (wax, wicks, jars during the month)$3,500
Ending Inventory (unsold stock)$1,500
COGS for the month$4,000

Plugging into the formula: $2,000 + $3,500 − $1,500 = $4,000.

If that same month you had $10,000 in sales, your gross profit is $10,000 − $4,000 = $6,000, and your gross margin is $6,000 ÷ $10,000 = 60%.

COGS Example #2: A Reseller

Now imagine you resell phone accessories online. You do not manufacture anything — you buy finished products and ship them. Over a quarter:

ItemAmount
Beginning Inventory$5,000
Purchases (stock + inbound shipping)$12,000
Ending Inventory$4,000
COGS for the quarter$13,000

$5,000 + $12,000 − $4,000 = $13,000. Notice that inbound shipping is part of COGS, but the shipping you pay to send orders to customers is usually a selling expense, not COGS.

Inventory Valuation: FIFO, LIFO & Weighted Average

When your unit costs change over time, the method you use to value inventory changes your COGS. There are three common approaches:

MethodHow It WorksEffect When Costs Rise
FIFO (First In, First Out)Oldest inventory is sold firstLower COGS, higher profit
LIFO (Last In, First Out)Newest inventory is sold firstHigher COGS, lower taxable profit
Weighted AverageUses the average cost per unitSmooths out price swings

Most small businesses use FIFO or weighted average because they are simple and widely accepted. Pick one method and apply it consistently — switching around distorts your numbers and raises red flags at tax time.

COGS by Business Type

  • Retailers and resellers — COGS is mostly the wholesale cost of goods plus inbound freight.
  • Manufacturers — COGS includes raw materials, direct labor, and factory overhead tied to production.
  • Service businesses — often report "Cost of Services" instead: the direct labor and materials used to deliver the service.

Gross Profit and Gross Margin: Reading the Numbers

Once you have COGS, two quick calculations tell you how healthy each sale is:

Gross Profit = Revenue − COGS
Gross Margin = Gross Profit ÷ Revenue

Gross margin is the percentage of every sales dollar you keep after direct costs. Healthy margins vary widely by industry:

Get the Latest Money Tips

Subscribe for free. Fresh personal finance and small business tips straight to your inbox. No spam.

Business TypeTypical Gross Margin
Grocery / general retail20% – 30%
E-commerce / consumer goods40% – 60%
Software / digital products70% – 90%

These are rough benchmarks, not targets. Compare your margin to others in your niche and, more importantly, to your own trend over time.

How to Use COGS to Set Profitable Prices

Once you know the COGS per unit, pricing becomes math instead of guesswork. Use this quick formula for a target margin:

Price = Unit COGS ÷ (1 − Target Margin)

Say each candle costs you $6 to make and you want a 60% gross margin:

  • Price = $6 ÷ (1 − 0.60) = $6 ÷ 0.40 = $15

At $15, you keep $9 of gross profit per candle to cover operating costs and profit.

Margin vs. Markup: Do Not Confuse Them

Markup is the amount added to cost; margin is profit as a percentage of the selling price. A $6 cost sold at $15 is a 150% markup but only a 60% margin. Pricing off markup when you mean margin is a classic way to quietly under-earn. For a deeper dive, see our Pricing & COGS guides.

6 Ways to Reduce Your COGS (Without Cutting Quality)

  1. Negotiate with suppliers or buy in larger batches for volume discounts.
  2. Reduce waste and spoilage in production and storage.
  3. Compare vendors regularly instead of renewing on autopilot.
  4. Optimize inbound shipping by consolidating orders.
  5. Improve your process so each unit takes less direct labor.
  6. Tighten inventory management so you buy what actually sells.

Track the impact by watching your gross margin move month over month. Small COGS savings compound fast at scale.

COGS and Taxes

COGS is subtracted from revenue before taxable income is calculated, so an accurate figure directly lowers your tax bill. That is also why the tax authorities care about how you value inventory. Keep clean records of purchases, inventory counts, and your chosen method — and when in doubt, work with a bookkeeper. Our Bookkeeping & Accounting section can help.

5 Common COGS Mistakes to Avoid

  1. Forgetting inventory changes. COGS is not just what you bought — it is what you sold. Always adjust for beginning and ending inventory.
  2. Ignoring direct labor. If you pay someone to assemble or produce the product, that labor is part of COGS.
  3. Counting overhead as COGS. Rent, ads, and admin salaries are operating expenses, not product costs.
  4. Switching inventory methods. Changing between FIFO and LIFO mid-stream distorts your results.
  5. Never counting inventory. Estimated ending inventory quietly corrupts every COGS number you report.
Quick Formula Cheat Sheet
  • COGS = Beginning Inventory + Purchases − Ending Inventory
  • Gross Profit = Revenue − COGS
  • Gross Margin = Gross Profit ÷ Revenue
  • Price = Unit COGS ÷ (1 − Target Margin)

Frequently Asked Questions

Is COGS the same as expenses?

No. COGS is only the direct cost of goods sold. Other business costs — rent, marketing, and salaries — are operating expenses reported separately.

Do service businesses have COGS?

Pure service businesses often report "Cost of Services" instead, which includes direct labor and materials used to deliver the service. If you sell no physical product, you may have little or no COGS.

How often should I calculate COGS?

At minimum, calculate it each month so you can track your gross margin over time. Many owners also review it per product line to spot which items are truly profitable.

Is shipping part of COGS?

Inbound freight to bring inventory in is part of COGS. Outbound shipping to send orders to customers is usually a selling expense, not COGS.

Does a lower COGS always mean more profit?

Usually, but not always. Cutting quality to lower COGS can hurt sales and reviews. Aim to reduce cost without damaging the value your customers pay for.

Which inventory method is best for a small business?

Most small businesses use FIFO or weighted average because they are simple and widely accepted. The best choice is the one you can apply accurately and consistently.

The Bottom Line

COGS is the foundation of every pricing and profit decision you make. Track it monthly, keep it separate from operating expenses, choose one inventory method and stick with it, and use the number to price for the margin your business actually needs. Do that consistently and your profit will stop being a mystery — and start being a plan.

Disclaimer: This article is for general informational and educational purposes only and does not constitute financial, tax, or accounting advice. Consult a qualified professional about your specific situation.

COGS small business pricing strategy bookkeeping gross margin
Yudhi
Written by

Yudhi

Founder & Editor, Capital Logic Guide

Yudhi is the founder and editor of Capital Logic Guide, where he writes practical, no-fluff guides on personal finance, small business, and money management for freelancers, solopreneurs, and small business owners. Every article is researched and built around real-world examples and numbers so it is genuinely useful. This content is educational only — for decisions about your own money, taxes, or business, always confirm the details with a qualified professional.

Share this article
Back

Comments (0)

Have a question or something to add? Write it below — no login required.

Sign in with your Google account to join the discussion.

Sign in with Google to comment

No comments yet. Be the first to share your thoughts!