Cost of Goods Sold Calculator

Calculate Cost of Goods Sold (COGS) to determine the direct costs of producing goods sold by your business.

Calculate COGS for inventory and profitability analysis.

About This Calculator

The Cost of Goods Sold (COGS) Calculator is an essential financial tool for businesses that manufacture or resell products. COGS represents the direct costs attributable to producing the goods a company sells during a specific accounting period. Understanding and accurately calculating COGS is fundamental to determining gross profit, setting competitive prices, and making informed inventory management decisions.

In financial accounting, COGS is one of the most critical line items on the income statement. It directly impacts your gross margin—the primary indicator of how efficiently your business converts raw materials and labor into sellable products. For manufacturers, retailers, and wholesalers, COGS tracking is required by Generally Accepted Accounting Principles (GAAP) and the IRS for proper tax reporting.

This calculator helps you compute COGS by accounting for beginning inventory, purchases made during the period, direct labor costs, manufacturing overhead, and ending inventory. Use it to analyze profitability, compare periods, and optimize your inventory turnover for better cash flow management.

The COGS Formula

COGS = Beginning Inventory + Purchases + Direct Labor + Manufacturing Overhead - Ending Inventory

Beginning Inventory = Value of unsold inventory at the start of the period

Purchases = Cost of raw materials or merchandise acquired during the period

Direct Labor = Wages paid to workers directly producing goods

Manufacturing Overhead = Indirect production costs (factory utilities, depreciation)

Ending Inventory = Value of unsold inventory at the end of the period

For retailers, a simplified formula is often used: COGS = Beginning Inventory + Purchases - Ending Inventory

COGS Components Breakdown

What counts as a direct cost included in COGS:

ComponentDescriptionExamples
Direct MaterialsRaw materials used in productionSteel, fabric, electronic components, packaging
Direct LaborWages for production workersAssembly line workers, machine operators
Manufacturing OverheadIndirect production costsFactory rent, utilities, equipment depreciation
Freight-InShipping costs for materialsDelivery charges to bring materials to factory
Purchase DiscountsReductions from suppliers (subtracted)Early payment discounts, volume discounts

COGS vs. Operating Expenses

Understanding what belongs in COGS versus operating expenses is crucial for accurate financial reporting:

COGS (Direct Costs)Operating Expenses (Indirect Costs)
Raw materials and componentsSales commissions and advertising
Production worker wagesAdministrative salaries
Factory rent and utilitiesOffice rent and utilities
Manufacturing equipment depreciationOffice equipment and software
Quality control in productionLegal and accounting fees

Key distinction: COGS represents costs that would not exist without production. Operating expenses are incurred regardless of production volume.

How to Use This COGS Calculator

  1. Enter beginning inventory: The value of inventory on hand at the start of your accounting period from your balance sheet.
  2. Input purchases: Total cost of raw materials, merchandise, or components purchased during the period.
  3. Add direct labor: Wages paid to workers directly involved in manufacturing or assembling products.
  4. Include manufacturing overhead: Factory costs like rent, utilities, equipment depreciation, and production supplies.
  5. Enter ending inventory: Value of unsold inventory at period end, determined by physical count or perpetual system.
  6. Add total revenue: Sales revenue for the period to calculate gross margin and related ratios.
  7. Review results: Analyze COGS, gross profit, gross margin percentage, and inventory turnover metrics.

Common COGS Calculation Mistakes to Avoid

❌ Including operating expenses in COGS: Marketing, sales commissions, and administrative costs belong on the income statement below gross profit, not in COGS. Including them overstates COGS and understates gross margin.

❌ Inconsistent inventory valuation: Switching between FIFO, LIFO, or weighted average methods between periods violates GAAP consistency principles and distorts trend analysis.

❌ Forgetting freight-in costs: Shipping costs to receive inventory should be included in COGS, while freight-out (delivery to customers) is a selling expense.

❌ Inaccurate physical inventory counts: Shrinkage, obsolescence, and counting errors affect ending inventory and therefore COGS accuracy. Conduct regular cycle counts.

❌ Omitting manufacturing overhead: For manufacturers, only including materials and ignoring factory overhead understates true production costs and overstates gross margin.

Inventory Valuation Methods

The method you choose affects reported COGS and net income:

MethodDescriptionBest ForTax Impact
FIFOFirst-In, First-Out: oldest inventory sold firstPerishable goods, rising pricesLower COGS, higher taxes in inflation
LIFOLast-In, First-Out: newest inventory sold firstTax minimization (US only)Higher COGS, lower taxes in inflation
Weighted AverageAverage cost of all units availableHomogeneous products, stable pricesModerate COGS, balanced approach

Note: LIFO is not permitted under IFRS and is primarily used in the United States. Once a method is selected, consistency is required.

Related Financial Calculators

Sources & Methodology: COGS calculations follow Generally Accepted Accounting Principles (GAAP) as defined by the Financial Accounting Standards Board (FASB) ASC 330 for inventory accounting. Inventory valuation methods comply with IRS Publication 538 for US tax purposes. For international businesses, IFRS (IAS 2) standards apply, noting that LIFO is prohibited under IFRS. Always consult with a qualified accountant for business-specific guidance. Calculator updated January 2026.

Frequently Asked Questions

What is Cost of Goods Sold (COGS) and how is it calculated?

Cost of Goods Sold (COGS) represents the direct costs of producing goods that a company sells during a specific period. The formula is: COGS = Beginning Inventory + Purchases During Period - Ending Inventory. This calculation captures only the cost of inventory actually sold, not all goods purchased. For manufacturers, COGS also includes direct labor and manufacturing overhead applied to products. COGS appears on the income statement and is subtracted from revenue to determine gross profit.

What expenses are included in COGS?

COGS includes three main categories: (1) Direct materials—raw materials and components that become part of the finished product; (2) Direct labor—wages for workers directly involved in production; (3) Manufacturing overhead—factory rent, utilities, equipment depreciation, and production supplies. COGS specifically excludes selling expenses (sales commissions, advertising), general & administrative costs (office rent, executive salaries), and distribution costs. For retailers, COGS is primarily the purchase cost of merchandise resold.

How does COGS affect gross profit and taxes?

COGS directly reduces gross profit since Gross Profit = Revenue - COGS. A lower COGS means higher gross margins and more profit per sale. For taxes, COGS is a deductible business expense that reduces taxable income. Higher legitimate COGS reduces tax liability, which is why accurate inventory valuation matters. The IRS requires businesses with inventory to use an accrual accounting method for COGS. Inventory valuation method (FIFO, LIFO, weighted average) significantly impacts both reported profit and tax obligations.