#687 · Business Tool

Cost of Goods Sold Calculator

Use this cost of goods sold calculator to estimate COGS, gross profit, and gross margin from inventory and purchase data.

Calculator

Inventory, purchases, direct costs, revenue
$
$
$
$
$
Ad space

How to use this calculator

Enter beginning inventory, purchases, freight or direct costs, ending inventory, and sales revenue. The calculator applies the standard COGS formula and estimates gross profitability.

What the result means

COGS measures the direct cost of products sold. Lower COGS relative to revenue usually improves gross margin, assuming pricing remains stable.

COGS = Beginning inventory + purchases + freight/direct costs - ending inventory. Gross profit = Revenue - COGS.

Include only costs directly tied to goods sold. Operating expenses such as general payroll, rent, and marketing are usually not COGS.

Example calculation

With $40,000 beginning inventory, $120,000 purchases, $8,000 direct costs, and $35,000 ending inventory, COGS is $133,000.

Tips for better results

  • Use recent numbers rather than optimistic guesses.
  • Run the calculator again after changing price, cost, or conversion assumptions.
  • Treat the result as a planning estimate, not audited financial advice.

FAQ

How do I calculate cost of goods sold?

COGS equals beginning inventory plus purchases and direct costs, minus ending inventory.

What costs should be included in COGS?

COGS usually includes product cost, raw materials, direct labor, freight-in, packaging, and other direct costs needed to make or acquire the goods sold.

Is shipping included in cost of goods sold?

Inbound freight or freight-in is often included in COGS. Outbound customer shipping may be treated separately depending on accounting policy.

What is the difference between COGS and operating expenses?

COGS is directly tied to producing or acquiring goods sold. Operating expenses support the business more broadly, such as marketing, admin, and rent.

How does COGS affect gross profit?

Higher COGS lowers gross profit and gross margin unless revenue or pricing increases enough to offset it.

Metric guide

MetricMeaning
COGSDirect cost of goods sold
Gross profitSales revenue minus COGS
Gross marginGross profit as percentage of revenue

Browse more calculators

Category hubs