Cost of Goods Sold Calculator

Calculate your COGS to determine gross profit and margin. Enter beginning inventory, purchases, and ending inventory.

SC
Written by Sarah Chen, CFP
Certified Financial Planner
JW
Fact-checked by Dr. James Wilson, PhD
Options Strategy Researcher
Profit & LossFact-Checked

Input Values

$

Value of inventory at start of period.

$

Total purchases and production costs during the period.

$

Value of inventory at end of period.

$

Total sales revenue for gross margin calculation.

Results

Cost of Goods Sold
$0.00
Gross Profit
$250,000.00
Gross Margin (%)0.00%
COGS as % of Revenue0.00%
Results update automatically as you change input values.

What Is Cost of Goods Sold (COGS)?

Cost of Goods Sold (COGS) represents the direct costs attributable to the production or acquisition of goods sold by a company. It includes raw materials, direct labor, and manufacturing overhead directly tied to production. COGS is subtracted from revenue to calculate gross profit, making it one of the most important line items on the income statement.

Understanding COGS is essential for pricing decisions, profitability analysis, and tax reporting. The IRS requires businesses that sell products to calculate COGS for tax purposes. Accurately tracking COGS ensures your gross margin reflects true production efficiency.

i
COGS vs. Operating Expenses

COGS includes only DIRECT costs of production: materials, direct labor, factory overhead. It does NOT include selling expenses, administrative costs, or marketing. Those are operating expenses and affect operating margin, not gross margin.

COGS Formulas

COGS Calculation
COGS = Beginning Inventory + Purchases - Ending Inventory
Where:
Beginning Inventory = Inventory value at the start of the period
Purchases = All inventory purchased or produced during the period
Ending Inventory = Inventory value at the end of the period
Gross Profit from COGS
Gross Profit = Revenue - COGS
Where:
Revenue = Total sales revenue
COGS = Cost of goods sold
COGS Calculation Example
Given
Beginning Inventory
$50,000
Purchases
$120,000
Ending Inventory
$45,000
Revenue
$250,000
Calculation Steps
  1. 1COGS = $50,000 + $120,000 - $45,000 = $125,000
  2. 2Gross Profit = $250,000 - $125,000 = $125,000
  3. 3Gross Margin = $125,000 / $250,000 = 50%
  4. 4COGS as % of Revenue = $125,000 / $250,000 = 50%
Result
COGS is $125,000, yielding $125,000 in gross profit and a 50% gross margin. Half of every revenue dollar goes toward direct production costs.

What Is Included in COGS?

COGS Components by Business Type
Business TypeIncluded in COGSNOT Included in COGS
ManufacturerRaw materials, direct labor, factory rent, equipment depreciationAdmin salaries, marketing, office rent
RetailerPurchase cost of inventory, freight-in, import dutiesStore rent, cashier wages, advertising
Service BusinessDirect labor for services, materials consumedOverhead, admin, sales costs
E-commerceProduct cost, packaging, inbound shippingWebsite hosting, marketing, customer service

Inventory Valuation Methods

  • FIFO (First In, First Out): Oldest inventory costs are used for COGS first. Results in lower COGS during inflation.
  • LIFO (Last In, First Out): Newest costs used first. Results in higher COGS during inflation, reducing taxable income. Not allowed under IFRS.
  • Weighted Average: Average cost of all inventory used for COGS. Smooths cost fluctuations.
  • Specific Identification: Each item tracked individually. Used for high-value, unique items (jewelry, cars, real estate).

How to Calculate COGS Accurately

1
Count Beginning Inventory
At the start of each accounting period, count and value all inventory on hand. Use your chosen valuation method (FIFO, LIFO, or weighted average) consistently.
2
Track All Purchases
Record every inventory purchase, including freight-in, customs duties, and any costs to get inventory ready for sale. Include materials, components, and finished goods.
3
Count Ending Inventory
At period end, count all remaining inventory. Value it using the same method as beginning inventory.
4
Apply the COGS Formula
COGS = Beginning Inventory + Purchases - Ending Inventory. This gives you the cost of inventory that was actually sold during the period.
!
Tax Implications of COGS

The IRS requires businesses with inventory to use an accrual method for COGS. Your choice of inventory valuation method (FIFO vs. LIFO) directly affects taxable income. LIFO reduces COGS taxes during inflation but is not reversible once elected. Consult a tax professional before choosing.

Frequently Asked Questions

COGS = Beginning Inventory + Purchases - Ending Inventory. For example: $50,000 beginning + $120,000 purchases - $45,000 ending = $125,000 COGS. This represents the cost of inventory that was actually sold during the period.

Sources & References

  • U.S. Securities and Exchange Commission (SEC) - Investor Education
  • Options Clearing Corporation (OCC) - Options Education
  • Chicago Board Options Exchange (CBOE) - Options Strategies
  • Hull, J.C. "Options, Futures, and Other Derivatives" (11th Edition, 2021)

Embed This Calculator on Your Website

Free to use with attribution

Copy the code below to add this calculator to your website, blog, or article. A link back to CoveredCallCalculator.net is included automatically.

<iframe src="https://coveredcallcalculator.net/embed/cost-of-goods-sold-calculator" width="100%" height="500" frameborder="0" title="Cost of Goods Sold Calculator" style="border:1px solid #e2e8f0;border-radius:12px;max-width:600px;"></iframe>
<p style="font-size:12px;color:#64748b;margin-top:8px;">Calculator by <a href="https://coveredcallcalculator.net" target="_blank" rel="noopener">CoveredCallCalculator.net</a></p>