Cost of Goods Sold Calculator

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

MB
Operated by Mustafa Bilgic
Independent individual operator
|Profit & LossEducational only

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.

Related Strategy Guides

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.

COGS in Financial Statements and Valuation

Cost of Goods Sold (COGS) is the direct cost of producing the goods or services a company sells. On the income statement, COGS is subtracted from revenue to arrive at gross profit. The gross margin (gross profit / revenue) is one of the most important indicators of a business's pricing power and operational efficiency. High gross margins enable businesses to absorb operating expenses (SG&A, R&D, marketing) and still generate strong net income. For investors, declining COGS as a percentage of revenue (expanding gross margins) is a bullish signal, while rising COGS (margin compression) can indicate pricing pressure, rising input costs, or operational inefficiency.

COGS accounting methods significantly affect reported profitability and tax liability. FIFO (First In, First Out) assumes the oldest inventory is sold first — in inflationary environments, FIFO results in lower COGS (older, cheaper inventory sold first) and higher reported gross profit, but also higher taxes. LIFO (Last In, First Out) assumes the newest inventory is sold first — in inflation, LIFO produces higher COGS and lower taxable income, reducing taxes but also reducing reported profits. LIFO is allowed under U.S. GAAP but prohibited under IFRS (used internationally). Weighted average cost averaging is a middle-ground approach. The choice of inventory accounting method is a significant business and tax decision.

COGS for Service Businesses vs. Product Companies

While COGS is straightforward for product companies (raw materials + direct labor + manufacturing overhead), service businesses have a different cost structure often called Cost of Revenue or Cost of Services. For a SaaS company, COGS includes hosting costs, customer support, and payment processing fees, but not salaries of engineers building new features (those go to R&D). For a consulting firm, COGS is primarily the salaries and benefits of billable consultants. For a staffing agency, COGS is the wages paid to temporary workers. Understanding which costs belong in COGS vs. operating expenses is essential for accurate gross margin reporting and management decision-making.

~
Track COGS Weekly for Cash Flow Management

For product-based businesses, tracking COGS in real-time helps manage cash flow and profitability proactively. When material costs rise (due to inflation or supply chain disruptions), you need to either raise prices, find cheaper suppliers, or accept margin compression — decisions that require immediate visibility. Inventory management systems integrated with your accounting software (QuickBooks, Xero, NetSuite) can calculate COGS automatically as you sell, giving you real-time gross margin visibility by product, SKU, and category.

Recommended Reading

Affiliate

As an Amazon Associate, we earn from qualifying purchases.

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

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>

More Picks You Might Like

Affiliate

As an Amazon Associate, we earn from qualifying purchases.