COGS Calculator United States

This COGS calculator finds cost of goods sold from beginning inventory, purchases and ending inventory, plus gross profit, margin and inventory turnover.

COGS Calculator United States
US$
US$
US$
US$
US$
Cost of goods sold —
Cost of goods available for sale —
Gross profit —
Gross margin —
Inventory turnover —

We always strive to use the latest data for every variable so our results and reports are as accurate as possible. Even so, errors are possible — you should not rely on this tool or its report alone, and we accept no liability for any decision made based on it.

What it does

The COGS Calculator works out your cost of goods sold from beginning inventory, purchases, and ending inventory, and can show gross profit and margin when you add revenue.

Data sources & parameters

This calculator uses standard financial formulas and runs entirely in your browser. It needs no external rate data — your result is computed only from the values you enter above.

We always strive to use the latest data for every variable so our results and reports are as accurate as possible. Even so, errors are possible — you should not rely on this tool or its report alone, and we accept no liability for any decision made based on it.

The formula

COGS = beginning inventory + purchases + additional direct costs - ending inventory

How it works

It adds purchases and any direct costs to your beginning inventory to find the goods available for sale, then subtracts ending inventory to find COGS.

Where it is used

  • Preparing an income statement
  • Tracking gross profit and margin
  • Estimating inventory turnover

Worked example

Starting with $20,000.00 of inventory, buying $50,000.00, and ending with $15,000.00, your cost of goods sold is … from … of goods available for sale.

What the COGS calculator does

The COGS calculator finds your cost of goods sold, the direct cost of the inventory your business sold during a period. It starts from beginning inventory, adds purchases and any direct costs, and subtracts the inventory still on hand at the end. The result is the stock cost that goes on the income statement as an expense against the period’s sales.

For a business that sells physical products, COGS is the line between revenue and gross profit, so it affects how you read profitability, set prices and file taxes. The tool applies the standard periodic inventory formula and, if you enter revenue, also calculates gross profit, gross margin and inventory turnover.

The COGS formula

  • Cost of goods available for sale = beginning inventory + purchases + additional direct costs.
  • COGS = cost of goods available for sale – ending inventory.

Everything available to sell was either sold or is still in inventory at the end of the period, so subtracting ending inventory from goods available leaves the cost of what was sold. An error in the ending inventory count therefore flows straight into COGS and profit.

Beginning inventory, purchases, and ending inventory

Beginning inventory is the value of unsold products at the start of the period. In a continuing business it normally equals the previous period’s ending inventory.

Purchases are the cost of inventory bought during the period. For a manufacturer this line often covers materials and production instead of finished goods bought for resale, but the formula is the same.

Ending inventory is the value of stock still held at the close of the period, usually confirmed by a physical count or a perpetual inventory system. A higher ending inventory gives a lower COGS, and a lower one gives a higher COGS.

Additional direct costs

Some direct costs beyond the purchase price belong in COGS, most commonly inbound freight and, for a business that makes its own goods, direct production labor. Add these as additional direct costs. Indirect costs such as office rent, advertising and administrative salaries are operating expenses and should be left out.

Gross profit, margin, and turnover

  • Gross profit = revenue – COGS, what remains to cover operating expenses and profit.
  • Gross margin = gross profit divided by revenue, as a percentage, which lets you compare periods or products of different sizes.
  • Inventory turnover = COGS divided by average inventory (the mean of beginning and ending inventory), the number of times you sold and replaced your stock during the period.

A healthy gross margin varies widely by industry, so compare it with your own history and your sector’s norms.

Inventory costing methods

The formula is the same whatever method you use to value units, but the dollar amounts you enter depend on it. First-in first-out assumes the oldest inventory is sold first; last-in first-out assumes the newest is sold first; weighted average cost spreads the cost of all units evenly. When prices are rising, first-in first-out tends to report lower COGS and higher profit, and last-in first-out the opposite. Use one method consistently, because switching changes reported profit and can complicate your financial statements and tax return.

Periodic versus perpetual inventory

A periodic system measures inventory at set intervals, typically with a physical count at period end, and derives COGS from this formula. A perpetual system updates inventory with each sale and purchase, so COGS is known at any time. Even with a perpetual system, the periodic formula is a useful check: a gap between the calculated COGS and the running total can reveal shrinkage, miscounts or recording errors.

What you need to enter

  • Your beginning inventory for the period.
  • Total purchases of inventory during the period.
  • Your ending inventory, ideally from an actual count.
  • Any additional direct costs such as freight-in or direct labor.
  • Revenue for the period, if you want gross profit and margin.

Use the same valuation method every period, and carry each period’s ending inventory forward as the next period’s beginning inventory; small mismatches build up and distort the profit trend. Recalculate each period. For formal financial statements or a tax filing, reconcile the result with your accounting records and confirm the treatment of specific costs with an accountant.

This is general information only and not financial advice.

About This COGS Calculator

Use this COGS calculator to get an instant estimate based on the figures you enter. Adjust the inputs above to match your situation, or browse all our calculators to plan your next step.

Frequently asked questions

What is cost of goods sold?
Cost of goods sold, or COGS, is the direct cost of the inventory a business sold during a period. It excludes overhead such as marketing and administration and covers only the cost of the products themselves.
How is COGS calculated?
COGS equals beginning inventory plus purchases during the period, minus ending inventory. Direct costs of getting inventory ready to sell, such as freight-in, can be added to the goods available for sale.
What counts as beginning and ending inventory?
Beginning inventory is the value of unsold stock at the start of the period, usually equal to the previous period's ending inventory. Ending inventory is the value of stock still unsold at the close of the period, typically confirmed by a count.
Why does COGS matter for taxes?
COGS is subtracted from gross receipts to arrive at gross profit, which lowers taxable income for a product business. Record it accurately for both financial statements and the tax return, and keep supporting inventory records.
What is inventory turnover?
Inventory turnover is COGS divided by average inventory. It shows how many times a business sold and replaced its stock during the period. Higher turnover generally means inventory is managed efficiently.
Are freight and labor part of COGS?
Direct costs of acquiring or preparing inventory, such as inbound freight and direct production labor, are typically included in COGS. Indirect costs like office salaries and advertising are operating expenses, not COGS.

About the author

Taha Kheirandish

Written and reviewed by

Taha Kheirandish

Economics student and independent researcher

Taha Kheirandish reads tax codes the way other people read maps — to find out where a system actually leads, not where it claims to go.

He is an economics student, and his work here is comparative by design. A pension deferral bonus in Quebec, a commuting allowance in Germany, a rent-increase ceiling in the Netherlands: each is a decision a government made about how money should move, and each reads differently once you set it beside eight others. He builds and checks these calculators across nine markets from primary sources — the regulation rather than a summary of it, the ministry’s own circular rather than a news item quoting it.

That is the editorial standard of the site as well as his habit. Every rate, threshold and bracket here carries the document it was read from and the date it takes effect, and gets re-checked when the law moves rather than when someone happens to notice.

He is a researcher, not a licensed adviser, and nothing on this site is personal financial advice. It is arithmetic done carefully with its sources shown — so that you can check it, and take it to someone who is.

Leave a Reply

Your email address will not be published. Required fields are marked *