COGS Calculator (Cost of Goods Sold)
Use this quick calculator to find your cost of goods sold using the standard formula:
Tip: Leave optional fields blank if they do not apply to your business.
What is the formula to calculate COGS?
COGS (Cost of Goods Sold) represents the direct costs of producing or purchasing the products your business sold during a period. For most retail and wholesale businesses, the basic formula is:
Where Net Purchases is typically:
Why COGS matters
COGS is one of the most important numbers in your income statement because it directly affects your gross profit and overall profitability. If your COGS is too high, your margins shrink. If your COGS is inaccurate, your financial statements, tax reporting, and pricing decisions can all be off.
- Pricing: Helps you set a selling price that protects margin.
- Profitability: Supports gross profit and net income analysis.
- Tax accuracy: Prevents under- or over-reporting taxable income.
- Inventory control: Highlights waste, theft, or purchasing inefficiency.
Step-by-step: how to calculate COGS
1) Start with beginning inventory
Beginning inventory is the value of inventory at the start of your accounting period. It should match the previous period's ending inventory.
2) Add net purchases
Include all inventory bought for resale (or production), add freight-in, then subtract purchase returns and discounts. This gives a cleaner picture of what inventory truly cost you.
3) Subtract ending inventory
Ending inventory is what you still have on hand at period-end. Since these goods were not sold, they should not be included in cost of goods sold.
COGS example calculation
Suppose your numbers for the month are:
- Beginning Inventory: $15,000
- Purchases: $42,000
- Freight-In: $1,200
- Purchase Returns: $500
- Purchase Discounts: $300
- Ending Inventory: $10,000
Net Purchases = 42,000 + 1,200 - 500 - 300 = $42,400
Goods Available for Sale = 15,000 + 42,400 = $57,400
COGS = 57,400 - 10,000 = $47,400
COGS vs operating expenses
A common mistake is mixing COGS with operating expenses. COGS only includes costs directly tied to the goods sold. Expenses such as marketing, office rent, admin salaries, and software subscriptions are typically operating expenses, not COGS.
Common mistakes when calculating COGS
- Using estimated inventory counts instead of physical or reliable system counts.
- Forgetting freight-in and import duties that should be included in inventory cost.
- Not subtracting purchase returns and supplier credits.
- Inconsistent accounting method across periods.
- Treating labor and overhead inconsistently in manufacturing environments.
Inventory valuation methods and COGS impact
Your inventory valuation method (FIFO, LIFO, weighted average) can change your reported COGS and gross profit. During inflation, for example, FIFO often shows lower COGS and higher profit than LIFO. Choose a method carefully and apply it consistently.
Tips to lower COGS without hurting quality
- Negotiate better supplier pricing and payment terms.
- Reduce waste, spoilage, and over-ordering.
- Improve demand forecasting and reorder points.
- Standardize SKUs and simplify purchasing.
- Review shipping and freight contracts regularly.
Final takeaway
If you remember one thing, remember this: COGS = Beginning Inventory + Net Purchases - Ending Inventory. Track inputs consistently, count inventory accurately, and review the number monthly. Better COGS tracking means better pricing decisions, clearer margins, and stronger financial control.