Verified Tool

COGS Calculator — Cost of Goods Sold (2025)

Calculate Cost of Goods Sold (COGS) instantly. Determine your gross profit and margin with our free 2025 calculator for better inventory management.

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

Net Purchases
$60,000.00
Purchases + Freight‑in − Returns − Discounts
COGS
$65,000.00
Beg. Inventory + Net Purchases − End. Inventory
Gross Profit
$35,000.00
Gross Margin
35.00%

Visual Breakdown

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): Comprehensive Guide

Written by Jurica ŠinkoNovember 13, 2025
COGS Calculator — Cost of Goods Sold (2025)

Cost of Goods Sold (COGS) represents the direct costs attributable to the production of the goods sold in a company. This includes the cost of the materials used in creating the good along with the direct labor costs used to produce the good. It excludes indirect expenses, such as distribution costs and sales force costs.

COGS is a critical metric for investors and analysts because it is subtracted from revenue to determine gross profit. Gross profit is the measure of a company's efficiency in using its labor and supplies in the production process. A lower COGS relative to revenue translates to a higher gross margin, leaving more capital to cover operating expenses like marketing, R&D, and administrative salaries.

Key Formulas

Basic COGS Equation:
Beginning Inventory + Purchases − Ending Inventory = COGS

Gross Margin %:
(Revenue − COGS) / Revenue × 100 (See Gross Margin Calculator)

How to Use This COGS Calculator

  1. Beginning Inventory: Enter the dollar value of inventory at the start of the period. This should match the Ending Inventory from the previous period.
  2. Purchases: Input the total cost of raw materials or merchandise purchased during the period.
  3. Freight-in: Add any shipping costs required to bring the inventory to your warehouse. (Outbound shipping to customers is an operating expense, not COGS).
  4. Purchase Returns & Discounts: Enter the value of returned goods or discounts received from vendors. These reduce your net purchases.
  5. Ending Inventory: Enter the value of unsold inventory remaining at the end of the period.
  6. Revenue (Optional): Input your total sales to calculate Gross Profit and Gross Margin Percentage.

What Is Included in COGS?

Determining what qualifies as a "direct cost" can be tricky. Here is a definitive breakdown of what should and shouldn't be included in your COGS calculation:

CategoryInclude in COGS?Reasoning
Raw MaterialsYESEssential components of the product.
Freight-InYESCost to get materials to production site.
Direct LaborYESWages of assembly line or manufacturing staff.
Factory OverheadYESRent and utilities for the manufacturing plant only.
Shipping to CustomersNOSelling/distribution expense (Operating Expense).
Sales CommissionsNODirect selling expense, not production cost.
Marketing AdsNOOperating expense.

Inventory Valuation Methods (FIFO vs LIFO)

The value you assign to Ending Inventory dramatically affects your COGS and taxable income. Since inventory prices fluctuate, the accounting method you choose matters.

FIFO (First-In, First-Out)

Assumes the oldest inventory items are sold first. In an inflationary environment (rising prices), the cost of older (cheaper) inventory flows to COGS.

  • Lower COGS (usually)
  • Higher Net Profit
  • ⚠️ Higher Taxes

LIFO (Last-In, First-Out)

Assumes the newest inventory items are sold first. If prices are rising, the higher recent costs flow to COGS.

  • Higher COGS
  • Lower Taxable Income
  • ⚠️ Lower Net Profit/EPS

*Note: The IRS allows LIFO, but International Financial Reporting Standards (IFRS) strictly forbid it. If you expand globally, this reconciliation can be complex.

COGS Across Different Industries

While the concept remains the same, the line items that feed into COGS differ significantly by sector.

1. Retail & E-Commerce

For retailers (like a clothing store), COGS is straightforward. It is primarily the purchase price of the merchandise plus shipping to the warehouse.
Example: A shirt costs $10 to buy from a wholesaler and $1 to ship. COGS per unit = $11.

2. Service Businesses

Service companies (law firms, consultants, software dev shops) often do not have "goods." Instead, they have "Cost of Revenue" or "Cost of Services." This usually includes the salaries of the employees delivering the service (billable hours) and software costs directly tied to delivery (like server hosting for a SaaS app).

3. Manufacturing

Manufacturers face the most complexity. Their COGS includes Raw Materials, Direct Labor, and Manufacturing Overhead (electricity for machines, factory rent, equipment depreciation). They must calculate Cost of Goods Manufactured (COGM) before determining COGS.

Strategies to Lower COGS

Reducing COGS directly boosts your bottom line. Here are proven strategies:

  • Bulk Purchasing: Negotiate volume discounts with suppliers to lower unit costs. Check your Markup.
  • Supply Chain Audit: Review freight-in costs. Are you paying for expedited shipping unnecessarily?
  • Waste Reduction: In manufacturing, "scrap" is wasted money. Lean manufacturing principles can minimize raw material waste.
  • Automation: Investing in machinery can reduce direct labor hours per unit, lowering variable costs over time.
  • Dropshipping: For retailers, dropshipping eliminates inventory holding costs (though often at the expense of lower margins per unit).

The 10-Point COGS Audit Checklist

If you are preparing for tax season or selling your business, your COGS numbers will be scrutinized. Use this checklist to ensure your books are bulletproof:

  • 1

    Cutoff Validation: Did the inventory arrive at the loading dock at 11:59 PM on Dec 31st? Ensure it is counted in the correct year.

  • 2

    Consignment Check: Exclude goods you hold on consignment (you don't own them) but INCLUDE goods you sent out on consignment (you still own them properly).

  • 3

    Obsolete Inventory Write-Down: If you have dead stock, write it down to its "Net Realizable Value." This lowers ending inventory, increases COGS, and lowers taxes legitimately. Monitor with Inventory Turnover.

  • 4

    Vendor Reconciliation: detailed review of Accounts Payable to ensure every recorded purchase has a matching receipt.

  • 5

    Freight Allocation: Are you splitting shipping costs for mixed loads correctly across different product lines?

Integration with Accounting Software

Modern businesses shouldn't calculate COGS on a napkin. Most ERPs (Enterprise Resource Planning) and accounting tools handle this, but they require proper setup:

QuickBooks / Xero

Great for small businesses. They usually use "Average Cost" method by default. Ensure your "Item List" is mapped to "Cost of Goods Sold" accounts, not general expenses.

NetSuite / SAP

Enterprise grade. Allows specific choosing of LIFO/FIFO layers and "Standard Costing" (where you estimate cost and book variances later).

Shopify / Amazon

E-commerce platforms track inventory counts but often do NOT track unit costs accurately over time. You usually need a "connector" app (like A2X) to push accurate COGS data to your accounting ledger.

Tax Implications

COGS is a Tax Deduction

The IRS allows you to deduct COGS from your gross receipts to calculate your taxable business income. Accurately tracking COGS is not just about analytics; it's about not overpaying the government. For more details, see IRS Publication 538.

Warning: You cannot deduct the cost of inventory until you sell it. Purchasing $100,000 of inventory in December does not lower your taxes for that year unless you sell it before December 31st (under Accrual basis).

Frequently Asked Questions

Is COGS an asset or expense?

COGS is an expense on the Income Statement. However, before the goods are sold, they sit on the Balance Sheet as an asset (Inventory). When a sale occurs, the value moves from the Balance Sheet (Asset) to the Income Statement (Expense).

Does COGS include salaries?

Only the salaries of employees directly involved in production (e.g., assembly line workers). Administrative staff, HR, and sales team salaries are Operating Expenses (SG&A), not COGS.

What if my Ending Inventory is higher than my Beginning Inventory?

This means you purchased or produced more goods than you sold during the period. Your inventory asset account grows, and cash flow likely decreased (since cash is tied up in stock). This doesn't affect COGS directly, but it affects your liquidity.

Why is my COGS negative?

COGS should conceptually never be negative. If your calculator shows a negative number, check your inputs. Did you accidentally swap Beginning and Ending Inventory? Is the value of Purchase Returns higher than Purchases? This usually indicates an accounting error.

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 COGS Calculator — Cost of Goods Sold (2025)