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.
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.
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
What counts as a direct cost included in COGS:
| Component | Description | Examples |
|---|---|---|
| Direct Materials | Raw materials used in production | Steel, fabric, electronic components, packaging |
| Direct Labor | Wages for production workers | Assembly line workers, machine operators |
| Manufacturing Overhead | Indirect production costs | Factory rent, utilities, equipment depreciation |
| Freight-In | Shipping costs for materials | Delivery charges to bring materials to factory |
| Purchase Discounts | Reductions from suppliers (subtracted) | Early payment discounts, volume discounts |
Understanding what belongs in COGS versus operating expenses is crucial for accurate financial reporting:
| COGS (Direct Costs) | Operating Expenses (Indirect Costs) |
|---|---|
| Raw materials and components | Sales commissions and advertising |
| Production worker wages | Administrative salaries |
| Factory rent and utilities | Office rent and utilities |
| Manufacturing equipment depreciation | Office equipment and software |
| Quality control in production | Legal and accounting fees |
Key distinction: COGS represents costs that would not exist without production. Operating expenses are incurred regardless of production volume.
❌ 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.
The method you choose affects reported COGS and net income:
| Method | Description | Best For | Tax Impact |
|---|---|---|---|
| FIFO | First-In, First-Out: oldest inventory sold first | Perishable goods, rising prices | Lower COGS, higher taxes in inflation |
| LIFO | Last-In, First-Out: newest inventory sold first | Tax minimization (US only) | Higher COGS, lower taxes in inflation |
| Weighted Average | Average cost of all units available | Homogeneous products, stable prices | Moderate 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.
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.
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.
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.
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.