COGS Calculator
Use this calculator to estimate Cost of Goods Sold (COGS) using a practical formula that works for many retail, eCommerce, and product-based businesses.
What Is the COGS Calculation Formula?
COGS stands for Cost of Goods Sold. It represents the direct cost of producing or purchasing the products your business sold during a specific accounting period. COGS is one of the most important numbers on your income statement because it directly affects gross profit, taxable income, and inventory valuation.
COGS = Beginning Inventory + Net Purchases + Direct Production Costs − Ending Inventory
For a simple retail business, the formula is often written as:
COGS = Beginning Inventory + Purchases − Ending Inventory
Why COGS Matters So Much
If your COGS is wrong, your reported profit is wrong. Even a small inventory error can inflate earnings or make your business appear weaker than it really is. Accurate COGS helps with:
- Pricing decisions: You can’t set healthy prices without knowing true product costs.
- Profit analysis: Gross margin trends help identify product, supplier, or process issues.
- Tax reporting: COGS lowers taxable income, so documentation and consistency are critical.
- Cash planning: Inventory ties up cash; COGS reveals how quickly stock is moving through the business.
Step-by-Step Breakdown of the Formula
1) Beginning Inventory
This is the value of unsold inventory at the start of the period. It usually equals last period’s ending inventory.
2) Net Purchases
Net purchases are more than just the amount paid to suppliers. A cleaner version is:
This gives a more accurate landed cost for inventory entering the business.
3) Direct Production Costs (if applicable)
Manufacturers often include direct labor and manufacturing overhead in inventory costs. If you only resell finished products, this may be zero.
4) Ending Inventory
This is the value of unsold goods at period end, based on your inventory count and costing method (FIFO, LIFO, weighted average, etc.).
Worked Example: COGS Calculation
Suppose your company reports the following for a month:
| Item | Amount |
|---|---|
| Beginning Inventory | $15,000 |
| Purchases | $42,000 |
| Freight-In | $1,200 |
| Purchase Returns | $500 |
| Purchase Discounts | $350 |
| Ending Inventory | $14,000 |
Step 1: Net Purchases = 42,000 + 1,200 − 500 − 350 = $42,350
Step 2: Goods Available for Sale = 15,000 + 42,350 = $57,350
Step 3: COGS = 57,350 − 14,000 = $43,350
If monthly sales were $95,000, gross profit would be $51,650 and gross margin would be about 54.37%.
COGS Formula by Business Type
Retail and eCommerce
- Typically use beginning inventory + purchases − ending inventory.
- Freight-in and import duties are often significant and should be tracked.
- Shrinkage, damages, and returns can materially shift COGS if not accounted for properly.
Manufacturing
- COGS often starts from Cost of Goods Manufactured (COGM).
- Direct materials, direct labor, and overhead allocation become critical.
- Work-in-process and finished-goods balances add complexity.
Service Businesses
Pure service companies often don’t report traditional COGS. Instead, they track cost of services (labor, subcontractors, tools, software directly tied to delivery).
Common COGS Mistakes to Avoid
- Ignoring freight and landing costs: This understates true product cost.
- Mixing operating expenses into COGS: Marketing, admin salaries, and rent are usually not COGS.
- Poor inventory counts: Inaccurate ending inventory causes inaccurate COGS.
- Switching costing methods without disclosure: This can distort trend analysis and raise compliance issues.
- Not adjusting for returns and allowances: These can materially affect net purchases.
How to Improve COGS Performance
Lower COGS does not always mean “buy cheaper.” It can also mean better systems and process discipline. Strong operators focus on:
- Negotiating supplier terms and volume discounts.
- Reducing defects, spoilage, and return rates.
- Improving demand forecasting to avoid overbuying.
- Optimizing packaging and inbound logistics.
- Automating inventory tracking to reduce write-offs and stock discrepancies.
Quick Reference Formula Set
Goods Available for Sale = Beginning Inventory + Net Purchases + Direct Labor + Overhead
COGS = Goods Available for Sale − Ending Inventory
Gross Profit = Sales Revenue − COGS
Gross Margin % = (Gross Profit ÷ Sales Revenue) × 100
Final Thoughts
The cogs calculation formula is simple on paper but powerful in practice. When tracked consistently, COGS tells you whether your pricing, purchasing, and operations are working together. Use the calculator above monthly (or weekly for fast-moving businesses), and pair it with clean inventory records to keep your profit analysis accurate and decision-ready.