COGS Calculator — Cost of Goods Sold (2025)

Free COGS calculator using the standard formula: Beginning Inventory + Net Purchases − Ending Inventory. Includes freight‑in, returns/discounts, and gross margin analysis.

Free Finance Calculator
100% Private
Instant Results

COGS Calculator — Cost of Goods Sold (2025)

Enter your details below to calculate

COGS Calculator

Compute Cost of Goods Sold, gross profit, and margin in seconds.

Summary

Formula references follow standard periodic inventory accounting under GAAP/IFRS. In manufacturing contexts, Cost of Goods Manufactured (COGM) rolls into COGS by adding beginning finished goods and subtracting ending finished goods. This tool focuses on retail/wholesale net purchases with optional freight‑in and purchase adjustments.

How to Use Cogs Calculator

1

Enter Inventory and Purchases

Add beginning inventory, purchases during the period, and optional freight‑in, returns, and discounts.

2

Add Ending Inventory

Input the dollar value of inventory on hand at the end of the period (after any counts or adjustments).

3

Optional: Enter Revenue

Provide revenue to automatically compute gross profit and gross margin percentage.

4

Review COGS and Margin

See net purchases, COGS, and margin. Use presets to test scenarios like retail vs e‑commerce.

Key Features

COGS with freight‑in, returns, and discounts

Gross profit and gross margin %

Retail, e‑commerce, wholesale presets

Export results as JSON (advisor‑ready)

Mobile‑first UI with instant updates

Cost of Goods Sold (COGS): What It Is and Why It Matters

Cost of Goods Sold (COGS) reflects the direct costs required to purchase or produce the products you sell. It is the backbone of pricing and profitability: revenue minus COGS equals gross profit, and your gross margin percentage is one of the fastest ways to assess whether the business model scales.

COGS (Periodic System) Formula: Beginning Inventory + Net Purchases − Ending Inventory
Net Purchases = Purchases + Freight‑in − Purchase Returns − Purchase Discounts

How to Use the COGS Calculator on This Page

  1. Enter your Beginning Inventory for the period using the value from your prior period's balance sheet or inventory count.
  2. Fill in Purchases, Freight‑in, Purchase Returns/Allowances, and Purchase Discounts so the calculator can compute Net Purchases automatically.
  3. Type your Ending Inventory based on a physical count or reliable perpetual inventory report.
  4. Optionally add Revenue for the same period so the tool can calculate gross profit and gross margin percentage.
  5. Review the summary cards and chart: if COGS is zero or ending inventory looks too high, adjust your inputs until the numbers match your accounting records.

What's Included in COGS?

  • Direct materials you resell or use in production
  • Freight‑in and inbound shipping to acquire inventory
  • Purchase returns/allowances and discounts (as reductions to net purchases)
  • For manufacturers: the cost of goods manufactured (COGM) that flows into finished goods

Not included: outbound shipping to customers, marketing, sales commissions, R&D, and most overhead. Those are operating expenses, not COGS.

How to Calculate COGS (Step‑by‑Step)

  1. Start with Beginning Inventory (the dollar value on day one of the period).
  2. Add Purchases made during the period, plus Freight‑in.
  3. Subtract Purchase Returns/Allowances and Purchase Discounts.
  4. Subtract Ending Inventory (the dollar value left on hand).

Worked Example (Retail Store)

Beginning Inventory: $25,000

Purchases: $60,000; Freight‑in: $3,000; Returns: $2,000; Discounts: $1,000

Ending Inventory: $20,000

Net Purchases = 60,000 + 3,000 − 2,000 − 1,000 = 60,000
COGS = 25,000 + 60,000 − 20,000 = 65,000

If revenue was $100,000, gross profit = $35,000 and gross margin = 35%.

Manufacturing Note (COGM → COGS)

Manufacturers first compute Cost of Goods Manufactured (COGM): Direct Materials Used + Direct Labor + Manufacturing Overhead ± WIP changes. Then: COGS = Beginning Finished Goods + COGM − Ending Finished Goods. Our on‑page calculator focuses on retail/wholesale inputs, which is what most small businesses need.

How to Improve Gross Margin

  • Negotiate vendor pricing and seek early‑pay purchase discounts.
  • Reduce freight‑in through consolidated shipments or better lanes.
  • Lower returns/allowances with quality control and clear product pages.
  • Optimize assortment using ABC analysis to prioritize high‑margin items.

Common COGS Mistakes to Avoid

  • Booking outbound shipping and marketing into COGS (inflates COGS and hides opex).
  • Counting obsolete or damaged inventory at full value in ending inventory.
  • Ignoring purchase discounts and returns when computing net purchases.
  • Using the wrong inventory valuation method (FIFO/LIFO/Weighted Average) for your goals.

Quick Answers

  • Service businesses: Often report Cost of Sales instead; labor may be included if it is directly tied to delivery.
  • GAAP vs IFRS: Both allow FIFO and Weighted Average; LIFO is permitted under GAAP but not IFRS.
  • Taxes: In the U.S., COGS reduces taxable income. Keep purchase, freight‑in, and inventory records organized.

About the Author

Jurica Šinko

Finance Expert, CPA — inventory and cost accounting specialist

Connect with Jurica

Frequently Asked Questions

What is Cost of Goods Sold (COGS)?

COGS represents the direct cost to acquire or produce the items you sold during a period. In the periodic system it is Beginning Inventory + Net Purchases − Ending Inventory.

What is included in COGS?

Direct materials, inbound freight‑in, and purchase-related adjustments (returns/allowances, discounts). Sales and marketing, outbound shipping, and overhead are not COGS.

Does this calculator support gross margin?

Yes. If you enter revenue, the calculator computes gross profit and gross margin percentage automatically.

Which inventory methods apply (FIFO/LIFO/Weighted Average)?

The formula works with any inventory valuation method. Choose the method in your accounting system; the calculator uses the reported inventory dollar values.

Is outbound shipping part of COGS?

No. Outbound shipping to customers is usually a selling expense, not COGS. Freight‑in (bringing inventory to you) is included in COGS.

Can service businesses use this?

Many service businesses report Cost of Sales instead of COGS. If you sell materials along with services, include only the direct product costs here.

Share this calculator

Help others discover this tool

Related Calculators

Explore more tools in Business Finance

Accounts Payable Turnover Calculator: Ratio and Analysis

Measure how quickly business pays suppliers with our accounts payable turnover calculator. Input COGS and average accounts payable to find AP turnover ratio.

Business Finance

Accounts Receivable Turnover Calculator: Free AR Efficiency Tool

Free accounts receivable turnover calculator analyzes collection efficiency, cash flow health, and provides industry benchmarks. Calculate AR turnover ratio, collection period, and optimize your receivables management.

Business Finance

Break-Even Calculator: Free BEP Calculator for Business Finance

Calculate your break-even point instantly with our free BEP calculator. Determine how many units you need to sell to cover fixed and variable costs and reach profitability.

Business Finance

Burn Rate Calculator: Calculate Startup Cash Runway & Financial Health

Free startup burn rate calculator for 2025. Calculate gross burn, net burn, cash runway months, and break-even analysis. Critical tool for founders and investors.

Business Finance

Business Loan Calculator: Monthly Payments & Total Cost (2025)

Free business loan calculator calculates monthly payments, total interest, APR, and amortization for SBA loans, term loans, and commercial financing. Get accurate 2025 rates.

Business Finance

Business Valuation Calculator: Free Business Worth Calculator Using DCF & Multiples

Free business valuation calculator that estimates your company's worth using industry-standard methods including SDE multiples, EBITDA multiples, discounted cash flow (DCF), and asset-based approaches. Get accurate business valuations based on real market data and comparable sales.

Business Finance