Cost of Goods Sold Calculator

Understanding your Cost of Goods Sold (COGS) is one of the most important steps in evaluating your business's profitability.

Our free Cost of Goods Sold Calculator makes this process quick and simple — just enter your inventory and expense details, and it instantly calculates your total COGS to guide smarter pricing and profit analysis.

How to calculate Cost of Goods Sold?

The COGS formula is straightforward but powerful:

COGS = Beginning Inventory + Purchases + Direct Expenses − Ending Inventory

Each component plays a key role in understanding your actual cost of production:

  • Beginning Inventory: The value of goods you had at the start of the period.
  • Purchases: The cost of buying or producing new items during that period.
  • Direct Expenses: Costs directly tied to production or acquisition (like labor, shipping, or packaging).
  • Ending Inventory: The value of goods still unsold at the end of the period.

Subtracting your ending inventory from total goods available for sale gives you your actual cost of goods sold — the amount directly linked to the products you actually sold.

 

How to use the Cost of Goods Sold calculator?

Using our online COGS calculator is simple and intuitive:

  1. Enter your Beginning Inventory — how much your stock was worth at the start.
  2. Add Purchases — include all new inventory or manufacturing costs.
  3. Include Direct Expenses — such as labor, freight, or storage fees.
  4. Add your Ending Inventory — what’s left in stock at the end of the period.
  5. Click “Calculate COGS.”

The calculator instantly shows your total Cost of Goods Sold, along with a visual breakdown chart. You’ll see how each input affects your final COGS — helping you identify where costs can be optimized.

 

Examples of calculating Cost of Goods Sold

Example 1: The boutique store

Sara runs a small clothing boutique.

  • Beginning inventory: $15,000
  • Purchases during the season: $8,000
  • Direct expenses (shipping & packaging): $1,000
  • Ending inventory: $6,000

COGS = 15,000 + 8,000 + 1,000 − 6,000 = $18,000

This means Sara spent $18,000 on goods actually sold during that season, giving her a clear picture of profit margins.

 

Example 2: The artisan coffee roaster

Joe owns a local coffee roasting business.

  • Beginning inventory: $12,000
  • Coffee bean purchases: $7,000
  • Direct expenses (roasting supplies and packaging): $1,200
  • Ending inventory: $5,000

COGS = 12,000 + 7,000 + 1,200 − 5,000 = $15,200

By knowing his COGS, Joe can accurately price his coffee and improve his production planning for next season.

 

Find Out: Free COGS Template Google Sheets & Excel

 

Looking for beyond just calculating Cost of Goods Sold?

While our Cost of Goods Sold calculator helps with quick and accurate COGS calculations, growing businesses often require more in-depth insights and automation. That’s why we built Enerpize, our all-in-one cloud ERP system.

With Enerpize Inventory Management Software, you can:

  • Track stock levels and item movements in real time.
  • Automate Cost of Goods Sold calculations linked directly to your sales and inventory.
  • Manage purchases, suppliers, and expenses seamlessly.
  • Gain real-time financial visibility across your entire business.

If you’re ready to go beyond a simple COGS calculator, try Enerpize for smarter, automated inventory and accounting management — all in one powerful platform.

 

Disclaimer

This Cost of Goods Sold Calculator provides general financial estimates for educational and informational purposes only. Results may vary based on your specific business, accounting methods, and financial practices. For professional accounting or tax advice, please consult your accountant or financial advisor.

 

FAQs

 

How do you calculate COGS?

You can get the value of cost of goods sold using this formula:

COGS = Beginning Inventory + Purchases + Direct Expenses − Ending Inventory

Each part represents:

  • Beginning Inventory: Value of inventory at the start of the period
  • Purchases: Cost of goods bought or produced during the period
  • Direct Expenses: Costs directly related to production (e.g., labor, shipping, packaging)
  • Ending Inventory: Value of goods remaining unsold at the end of the period

 

What is the correct formula to calculate COGS?

Correct COGS Formula for small business:

COGS = Beginning Inventory + Purchases + Direct Expenses − Ending Inventory

 

How to calculate the cost of goods sold with an example?

You can calculate the cost of merchandise sold using the standard COGS formula.

Example: The Handmade Candle Business

Emma owns a small handmade candle company. During the year, her inventory and expenses were as follows:

  • Beginning Inventory: $10,000
  • Purchases: $5,500
  • Direct Expenses (wax, jars, and shipping): $1,200
  • Ending Inventory: $4,000

COGS = Beginning Inventory + Purchases + Direct Expenses − Ending Inventory

COGS = 10,000 + 5,500 + 1,200 − 4,000
COGS = $12,700

Emma’s Cost of Goods Sold (COGS) for the period is $12,700, meaning that’s the total cost of producing the candles she actually sold during the year.

 

How to calculate the cost of goods sold in retail?

Retailers calculate COGS using the formula:

COGS = Beginning Inventory + Purchases + Direct Expenses − Ending Inventory

 

How to get COGS from gross profit?

You can figure out the cost of goods sold by:

COGS = Revenue − Gross Profit

 

How to calculate COGS using an income statement?

On an income statement, COGS is typically listed directly under revenue.

You can calculate it as:

 COGS = Revenue − Gross Profit

 

How to calculate COGS from sales and margin? 

You can calculate Cost of Goods Sold (COGS) from your sales and profit margin using this simple formula:

COGS = Sales × (1 − Gross Margin%)

Where:

  • Sales = Total revenue from selling goods
  • Gross Margin% = The percentage of sales that represents your profit after deducting COGS

     

How do you calculate COGS using gross margin?

You calculate COGS based on margin by using:

COGS = Revenue × (1 − Gross Margin%)

For example, if your sales were $100,000 and your gross margin is 40%,
COGS = $100,000 × (1 − 0.40) = $60,000.

 

How do you calculate COGS with inventory?

Inventory is key to the COGS formula:

COGS = Beginning Inventory + Purchases + Direct Expenses − Ending Inventory

You start with what you already had (beginning inventory), add what you purchased or produced, and subtract what remains (ending inventory). The difference represents the goods actually sold. 

Calculating COGS is easy with Enerpize.

try free

Try Enerpize inventory software to calculate and manage inventory easily.

Start Your Free Trial

Share on: