Skip to content

How-to guide

How to Calculate Cost of Goods Sold: Formula, Steps & Examples

Learn how to calculate Cost of Goods Sold — the formula explained step by step, with worked examples and a free calculator to check your answer.

By Priya Nair, MBA, Finance & Strategy · Updated Jun 2026 · 2 min read

Calculating your cost of goods sold is straightforward once you know the Cost of Goods Sold formula and what each input means. This guide explains the method in plain language, walks through a manual calculation, and gives worked examples you can follow — then you can do it instantly with the Cost of Goods Sold Calculator.

What is Cost of Goods Sold?

The Cost of Goods Sold calculation tells you your cost of goods sold from a few simple inputs. The figure you are solving for here is the cost of goods sold, expressed in INR.

The Cost of Goods Sold formula

The core formula is:

Cost of goods sold = Opening inventory + Purchases during period - Closing inventory

Here is what each input means:

  • Opening inventory — a money amount. Example: ₹5,00,000.
  • Purchases during period — a money amount. Example: ₹30,00,000.
  • Closing inventory — a money amount. Example: ₹8,00,000.

How to calculate it step by step

  • Write down the opening inventory (for example, ₹5,00,000).
  • Write down the purchases during period (for example, ₹30,00,000).
  • Write down the closing inventory (for example, ₹8,00,000).
  • Apply the formula above to get your cost of goods sold.
  • Double-check the result with the Cost of Goods Sold Calculator.

Worked examples

Example 1

Input / OutputValue
Opening inventory₹5,00,000
Purchases during period₹30,00,000
Closing inventory₹8,00,000
Cost of goods sold₹27,00,000
Goods available for sale₹35,00,000

With opening inventory of ₹5,00,000, purchases during period of ₹30,00,000 and closing inventory of ₹8,00,000, the cost of goods sold works out to ₹27,00,000.

Example 2

With opening inventory of ₹10,00,000, purchases during period of ₹30,00,000 and closing inventory of ₹8,00,000, the cost of goods sold works out to ₹32,00,000.

ResultValue
Cost of goods sold₹32,00,000
Goods available for sale₹40,00,000

Example 3

With opening inventory of ₹2,50,000, purchases during period of ₹30,00,000 and closing inventory of ₹8,00,000, the cost of goods sold works out to ₹24,50,000.

ResultValue
Cost of goods sold₹24,50,000
Goods available for sale₹32,50,000

Tips for an accurate result

  • Keep your units consistent — mixing, say, months with years or grams with kilograms is the most common source of error.
  • Round only at the very end. Rounding inputs early can shift the final answer noticeably.
  • Re-run the numbers whenever an input changes, rather than estimating from an old result.

Prefer not to do the maths by hand? — the Cost of Goods Sold Calculator does it instantly, for free, with the formula and a worked example built in.

Continue exploring business calculators with these tools: Discount Calculator, Price Elasticity of Demand Calculator, Profit Margin Calculator, Gross Profit Calculator, ROI Calculator.

Calculators in this guide

Frequently asked questions

The formula is: Cost of goods sold = Opening inventory + Purchases during period - Closing inventory. With opening inventory of ₹5,00,000, purchases during period of ₹30,00,000 and closing inventory of ₹8,00,000, the cost of goods sold works out to ₹27,00,000.

Gather each input, apply the formula step by step keeping your units consistent, and round only at the end. You can verify your answer instantly with the Cost of Goods Sold Calculator.

It uses the standard formula with exact arithmetic, so the result is correct for the inputs you enter. Bear in mind that real-world outcomes can still differ when underlying assumptions change.

The cost of goods sold is expressed in INR. Make sure your inputs use matching units so the result is correct.

Priya Nair · MBA, Finance & Strategy

Priya Nair is a business analyst and MBA who advises small businesses and startups on pricing, unit economics and growth metrics.