Cost of Goods Sold (COGS) Calculator

Calculate COGS, gross profit, and gross margin to analyze profitability and inventory management efficiency.
Calculator
Enter your values

Inventory value at start of period

Inventory value at end of period

Analysis
Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Enter beginning inventory value (start of period)
  2. 2Input total purchases during the period
  3. 3Add ending inventory value (end of period)
  4. 4Enter total revenue for the period
  5. 5Review COGS, gross profit, and margin

COGS & Gross Profit Formulas

COGS represents the direct costs of producing goods sold. Gross margin shows profitability before operating expenses.
COGS = Beginning Inventory + Purchases - Ending Inventory Gross Profit = Revenue - COGS Gross Margin = (Gross Profit ÷ Revenue) × 100%

Variables:

COGSCost of Goods Sold - direct product costs
Gross ProfitRevenue minus COGS
Gross MarginGross profit as % of revenue
InventoryStock at beginning/end of period

Example

Retail Business Example

Inputs:

Beginning Inventory:$10,000
Purchases:$50,000
Ending Inventory:$8,000
Revenue:$100,000

Steps:

  1. 1.COGS = $10,000 + $50,000 - $8,000 = $52,000
  2. 2.Gross Profit = $100,000 - $52,000 = $48,000
  3. 3.Gross Margin = ($48,000 ÷ $100,000) × 100 = 48%
  4. 4.Inventory Turnover = $52,000 ÷ $9,000 avg = 5.8×
Result:
$52,000 COGS with 48% gross margin - healthy profitability

Frequently Asked Questions

What's a good gross margin?

Varies by industry. Retail: 20-40%, Restaurants: 60-70%, SaaS: 70-90%, Manufacturing: 25-35%, Wholesale: 15-25%. Higher margin = more profit to cover operating expenses.

What costs are included in COGS?

Direct costs only: raw materials, direct labor, manufacturing overhead, freight-in, packaging. NOT included: marketing, sales, admin, rent (operating expenses).

How do I reduce COGS?

Negotiate better supplier prices, buy in bulk, reduce waste/shrinkage, improve production efficiency, find cheaper alternatives, streamline logistics, and optimize inventory levels.