SC
Cost of Goods Sold Calculator
Enter your beginning inventory, purchases, and ending inventory to instantly find your COGS, gross profit, gross margin, and markup — free online COGS calculator for any business.

Enter Your Inventory Details

Value of all goods you had in stock at the start of the period
Please enter Beginning Inventory or Purchases — at least one is required.
All new inventory bought or manufactured during the period
Please enter Beginning Inventory or Purchases — at least one is required.
Value of unsold goods remaining at the end of the period
Enables gross profit & margin calculation
Manufacturing labor directly used in production
Factory costs: utilities, depreciation, supplies
Inbound shipping cost added to inventory value
Goods returned to supplier (reduces purchases)
Method used to value inventory for COGS calculation

Your COGS Breakdown

Enter your inventory numbers on the left and click Calculate COGS to see your full cost breakdown.

Cost of Goods Sold (COGS)
for this accounting period
Full Breakdown
Beginning Inventory
+ Purchases / Production
= Goods Available for Sale
− Ending Inventory
= Cost of Goods Sold
Try an Example

Cost vs. Profit Breakdown

Inventory Flow (Goods Available vs. COGS)

What Is Cost of Goods Sold?

Cost of goods sold (COGS) is the total direct cost of making or buying the products your business sold during a specific period. It is one of the most important numbers on any income statement.

COGS covers the actual cost of the inventory that left your shelves and went to customers. It does not include indirect costs like office rent, sales staff salaries, or marketing spend — those are called operating expenses and sit lower on the income statement.

Knowing your COGS helps you set the right prices, understand how profitable each sale is, and make smarter purchasing decisions. Once you have your COGS, you can use a selling price calculator to work out what to charge customers. A rising COGS without a matching rise in revenue is a clear warning sign for any business owner.

The COGS Formula Explained

The standard accounting formula used worldwide is:

  • COGS = Beginning Inventory + Purchases − Ending Inventory

Beginning Inventory is what you had in stock at the start. You add everything you bought or produced during the period. Then you subtract what is still unsold at the end. What is left is the cost of everything you actually moved out the door.

Example: You start with $10,000 of goods, buy $25,000 more, and end the period with $8,000 unsold. Your COGS is $27,000.

Gross Profit & Gross Margin

Once you know COGS, you can quickly find two other vital metrics:

  • Gross Profit = Revenue − COGS
  • Gross Margin % = (Gross Profit ÷ Revenue) × 100
  • Markup % = (Gross Profit ÷ COGS) × 100

Gross margin tells you what share of each dollar of sales you keep before operating expenses. A 40% gross margin means for every $100 sold, $40 remains to cover overhead and profit. To calculate the exact percentage to add on top of your cost, try the markup calculator.

IndustryTypical Gross Margin
Software / SaaS70 – 85%
Retail – Apparel45 – 60%
Retail – General25 – 45%
Restaurant / Food60 – 70%
Manufacturing20 – 40%
Wholesale / Distribution15 – 30%
Grocery / Supermarket20 – 30%

Inventory Valuation Methods

The method you use to value inventory directly changes your COGS — even with the exact same physical goods:

  • FIFO (First In, First Out): Oldest inventory is assumed sold first. In times of rising prices, FIFO gives lower COGS and higher profit.
  • LIFO (Last In, First Out): Newest inventory sold first. Gives higher COGS in rising markets, reducing taxable income. Note: LIFO is banned under IFRS (used outside the US).
  • Weighted Average: Averages the cost of all similar units. Smooth and consistent — good for businesses selling large volumes of identical items.
  • Specific Identification: Tracks the exact cost of each individual item sold. Best for high-value, unique goods like cars or jewelry.

COGS Dollar Amount by Revenue & COGS%

How much COGS to expect at different revenue levels and cost ratios.

Revenue ($) COGS 30% COGS 40% COGS 50% COGS 60% COGS 70%

Values show expected COGS at each revenue level for the given COGS-to-revenue percentage.

Gross Margin & Gross Profit by COGS

Find gross profit and margin for a range of revenues and COGS amounts.

Revenue ($) COGS ($) Gross Profit Gross Margin % Markup on Cost %

Gross Margin = (Revenue − COGS) ÷ Revenue × 100. Markup = (Revenue − COGS) ÷ COGS × 100.

Global Inventory Accounting Standards

How COGS rules differ by country and accounting framework.

Region / Standard LIFO Allowed? FIFO Allowed? Avg Cost? Notes
USA (US GAAP)YesYesYesOnly major economy permitting LIFO
EU / UK (IFRS)NoYesYesLIFO prohibited under IAS 2
Canada (ASPE/IFRS)NoYesYesIFRS adopted; LIFO not permitted
Australia (AASB)NoYesYesFollows IFRS; LIFO banned
India (Ind AS)NoYesYesConverged with IFRS standards
China (CAS)NoYesYesLIFO eliminated since 2007 reform
Japan (JGAAP)Yes*YesYesLIFO permitted but rarely used
Brazil (BR GAAP)NoYesYesAdopts IFRS framework

* Check current local regulations as rules may change. This table is for reference only.

Markup % vs. Gross Margin % Conversion Table

Markup is based on cost; margin is based on selling price. They are different numbers for the same profit.

Markup on Cost % Gross Margin % Sell Price if Cost = $100 Gross Profit if Cost = $100

Gross Margin = Markup ÷ (1 + Markup). Markup = Gross Margin ÷ (1 − Gross Margin). Always verify which formula your accounting system uses.

Average COGS % by Industry

Typical COGS-to-revenue ratios across different business types. Use these to benchmark your own numbers.

Industry Avg COGS % Avg Gross Margin % Key Cost Driver
Software / SaaS15 – 30%70 – 85%Hosting, support, licenses
Financial Services20 – 35%65 – 80%Transaction & servicing costs
Healthcare35 – 55%45 – 65%Medical supplies, direct staff
Restaurant / Food Service28 – 38%62 – 72%Food ingredients, kitchen labor
Retail – Apparel40 – 55%45 – 60%Product cost, import duties
Retail – Electronics65 – 80%20 – 35%High component cost, competition
Retail – Grocery70 – 80%20 – 30%Perishable goods, volume pricing
Manufacturing – Auto70 – 80%20 – 30%Raw materials, assembly labor
Manufacturing – Consumer55 – 70%30 – 45%Materials, factory overhead
Wholesale / Distribution70 – 85%15 – 30%Product acquisition cost
Construction65 – 80%20 – 35%Materials, subcontractors
E-commerce40 – 65%35 – 60%Product cost, fulfillment, returns

Ranges vary by company size, pricing strategy, and region. Use as a starting benchmark, not a hard rule.