Cost of Goods Sold Calculator

Estimate inventory cost flows with detailed expense adjustments. See gross profit, margins, and per-unit costs. Use cleaner numbers for smarter pricing and stock planning.

Enter Cost Inputs

Leave optional fields blank to treat them as zero. Use the adjustment field for write-downs, variances, or manual inventory corrections.

Opening inventory balance for the period.
Inventory bought during the period.
Inbound transport and receiving costs.
Direct production labor for goods sold.
Factory overhead allocated to inventory.
Packaging, setup, or related direct costs.
Returned goods credited by suppliers.
Discounts that lower acquisition cost.
Manual plus or minus cost corrections.
Closing inventory balance for the period.
Used for gross profit and margin analysis.
Used to estimate average COGS per unit.
Reset

Example Data Table

Scenario Beginning Inventory Purchases Freight-In Direct Labor Overhead Other Costs Returns Discounts Adjustment Ending Inventory Sales Revenue Units Sold COGS Gross Profit
Retail Mix A 15,000.00 45,000.00 2,200.00 8,000.00 6,500.00 1,300.00 900.00 600.00 500.00 14,000.00 95,000.00 3,200.00 63,000.00 32,000.00
Wholesale Batch B 9,000.00 28,000.00 1,200.00 4,500.00 3,700.00 900.00 500.00 300.00 0.00 7,600.00 62,000.00 2,100.00 38,900.00 23,100.00

Formula Used

Net Purchases = Purchases + Freight-In − Purchase Returns − Purchase Discounts
Production and Other Costs = Direct Labor + Manufacturing Overhead + Other Production Costs + Inventory Adjustments
Cost of Goods Available = Beginning Inventory + Net Purchases + Production and Other Costs
Cost of Goods Sold = Cost of Goods Available − Ending Inventory
Gross Profit = Sales Revenue − Cost of Goods Sold
Gross Margin % = (Gross Profit ÷ Sales Revenue) × 100
COGS per Unit = Cost of Goods Sold ÷ Units Sold
Inventory Turnover = Cost of Goods Sold ÷ Average Inventory, where Average Inventory = (Beginning Inventory + Ending Inventory) ÷ 2

How to Use This Calculator

  1. Enter the opening inventory value for the reporting period.
  2. Add purchases and inbound freight to reflect acquisition cost.
  3. Enter direct labor, overhead, and other production-related expenses when they belong in inventory cost.
  4. Subtract purchase returns and supplier discounts through their own fields.
  5. Use inventory adjustments for manual increases or decreases, including write-downs or corrections.
  6. Enter ending inventory to remove unsold cost from the current period.
  7. Add sales revenue and units sold to calculate gross margin and cost per unit.
  8. Press the calculate button to view the result above the form, then export the output as CSV or PDF.

FAQs

1. What does this calculator measure?

This calculator estimates the direct cost attached to goods sold during a period. It combines inventory, purchasing, and production cost inputs to show COGS, gross profit, margins, and turnover.

2. How is COGS different from operating expenses?

COGS covers direct inventory and production costs tied to sold items. Operating expenses cover selling, administration, rent, marketing, and other costs not assigned to inventory.

3. Should freight-in be included in COGS?

Yes. Freight-in and similar inbound costs usually increase inventory cost because they help bring goods to a usable or saleable condition and location.

4. Why are returns and discounts subtracted?

Purchase returns and supplier discounts reduce the true acquisition cost of inventory. Subtracting them gives net purchases instead of overstating inventory cost.

5. Can service businesses use this calculator?

Sometimes. It helps when a service business tracks direct delivery costs like inventory-style costs. Pure service firms often use cost of services instead.

6. What if ending inventory is higher than goods available?

That usually signals a data issue. Ending inventory cannot exceed total goods available unless values were omitted, duplicated, or posted in the wrong period.

7. Why is COGS per unit useful?

COGS per unit supports pricing, quote preparation, profitability analysis, and product comparison. It shows the average direct cost assigned to each sold unit.

8. How often should I calculate COGS?

Many businesses calculate COGS monthly for management reporting and again at quarter-end or year-end. High-volume inventory operations may review it weekly.

Related Calculators

cost of goods manufactured calculatoroperating leverage calculatorlabor cost variance calculatoroverhead allocation rate calculatorabsorption costing calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.