All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Audio Tools Font Tools Image Tools Subtitle Tools Video Tools
Archive Tools Document Tools Ebook Tools File Management Tools PDF Tools Presentation Tools
Config Tools Database Tools Dataset Tools JSON Tools Parser Tools Spreadsheet Tools XML Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Cost of Goods Sold Calculator

Enter your starting inventory, purchases during the period, and ending inventory, to calculate cost of goods sold (COGS). The formula, every assumption, and intermediate values are shown alongside the result.

The value of inventory on hand at the start of the period.

The cost of additional inventory bought or produced during the same period.

The value of inventory remaining unsold at the end of the period. Cannot exceed starting inventory + purchases.

How the Cost of Goods Sold Calculator calculates COGS

How to use the calculator

  1. Enter the inventory value at the start of the period in Starting inventory.
  2. Enter purchases made during that period in Purchases during period and the inventory value at its end in Ending inventory.
  3. Choose a display symbol in Currency symbol. This changes the symbol shown beside amounts and does not convert them.
  4. Select Calculate COGS to show goods available for sale, COGS, the formula, and the assumptions table.
  5. Select Copy result or Download result (.txt) to take the calculation outside the page. Select Reset to clear the inputs and result.

COGS formula from starting and ending inventory

The calculator adds Starting inventory and Purchases during period to get goods available for sale. It subtracts Ending inventory from that subtotal:

Starting inventory:       $20,000
Purchases during period:  $50,000
Goods available for sale: $70,000
Ending inventory:         $15,000
COGS:                     $55,000

The displayed formula is COGS = Starting inventory + Purchases - Ending inventory. The result lists the goods-available subtotal and the two inventory values, so each part of the subtraction is visible.

What the COGS calculator accepts

Each inventory field must contain a finite number of 0 or more. The inputs use a 0.01 step, and the result displays monetary values with two decimal places and locale-aware thousands separators.

Ending inventory cannot be greater than Starting inventory plus Purchases during period. If it is, the calculator shows an error and keeps the result hidden. Purchases during period is one value you enter; the calculator does not split it into separate accounting components.

When to use a cost of goods sold calculator

Use Starting inventory and Ending inventory measured at the beginning and end of the same accounting period. Include the purchases recorded during that period. The calculation does not choose an inventory costing method or separately model write-downs, returns, shrinkage, or other adjustments.

  • Check Starting inventory, Purchases during period, and Ending inventory before using the COGS figure in another calculation.
  • Keep the goods-available subtotal beside COGS when checking the arithmetic.
  • Copy or download the plain-text result after confirming that all three values use the same inventory basis.

Choose a related business calculator

Use Business Calculators when you need a different business measure. Choose the Inventory Turnover Calculator when you have COGS and average inventory and need turnover or days of inventory on hand. Choose the Gross Margin Calculator when you have revenue and direct cost and need gross profit or gross margin. The Business Profit Calculator combines COGS with several profitability calculations.

Frequently asked questions

How do I calculate cost of goods sold from inventory?

Add Starting inventory to Purchases during period, then subtract Ending inventory. The calculator shows the goods-available subtotal before COGS.

What is the COGS formula with beginning inventory?

The formula is COGS = Starting inventory + Purchases - Ending inventory. Starting inventory is the value at the period's beginning, and Ending inventory is the value remaining at its end.

Can ending inventory exceed goods available for sale?

Ending inventory must be no greater than Starting inventory plus Purchases during period. Otherwise, the calculator reports invalid input and hides the result.

Can I copy a cost of goods sold calculation?

After a valid calculation, Copy result copies the plain-text output, and Download result (.txt) saves the same result as a text file.

Does the COGS calculator use live inventory data?

It calculates from the three values you enter. It does not connect those fields to inventory records or market rates.

Related Tools

62 views