Calculate COGS using beginning inventory, purchases, and ending inventory. Compare FIFO, LIFO, and weighted-average methods with gross profit analysis.
Cost of Goods Sold (COGS) represents the direct costs of producing or purchasing the goods your business sells during a period. It's one of the most important line items on the income statement because it directly determines gross profit and gross margin. Accurate COGS calculation is essential for pricing, tax reporting, and financial analysis.
The basic COGS formula is straightforward: Beginning Inventory + Purchases − Ending Inventory = COGS. However, the choice of inventory valuation method (FIFO, LIFO, or Weighted Average) can produce significantly different COGS figures, especially during periods of rising or falling prices.
This calculator computes COGS using the standard formula, shows gross profit and gross margin, and lets you add manufacturing overhead and direct labor for businesses that produce goods. It also includes a period-over-period comparison to track COGS trends.
Entrepreneurs, finance teams, and small-business owners gain a competitive edge from accurate cost of goods sold (cogs) data when setting prices, forecasting revenue, or managing operational costs. Save this tool and revisit it each quarter to keep your financial plans aligned with current market realities.
COGS is required for every income statement, tax return, and profitability analysis. It determines your gross profit, which in turn constrains your operating profit. Tracking COGS as a percentage of revenue reveals efficiency trends: rising COGS% means margin erosion; falling COGS% means improving efficiency or pricing power. Instant recalculation lets you test different assumptions side by side, giving you the confidence to act on data rather than gut instinct.
COGS = Beginning Inventory + Purchases + Freight-In + Direct Labor + Manufacturing Overhead − Ending Inventory Gross Profit = Revenue − COGS Gross Margin (%) = (Gross Profit / Revenue) × 100 COGS Ratio (%) = (COGS / Revenue) × 100
Result: $213,000 COGS, $187,000 gross profit, 46.8% gross margin
COGS = $50,000 + $200,000 + $8,000 − $45,000 = $213,000. Gross profit = $400,000 − $213,000 = $187,000. Gross margin = $187,000 / $400,000 = 46.8%. COGS ratio = $213,000 / $400,000 = 53.3%. For every dollar of revenue, 53 cents goes to cost of goods and 47 cents is gross profit.
Retailers calculate COGS simply: beginning inventory + purchases − ending inventory. Manufacturers have a more complex calculation: they must account for raw materials, work-in-process (WIP), finished goods, direct labor, and factory overhead. The manufacturing COGS formula uses three inventory accounts and adds labor and overhead to the cost flow.
The three main methods — FIFO, LIFO, and Weighted Average — produce different COGS figures when unit costs change. In inflationary environments, FIFO produces lower COGS (and higher taxes), while LIFO produces higher COGS (and lower taxes). Most countries outside the US prohibit LIFO. IFRS requires FIFO or Weighted Average; US GAAP allows all three.
Tracking COGS as a percentage of revenue over time reveals important trends. Improving gross margin means COGS is growing slower than revenue — a sign of pricing power, efficiency gains, or favorable cost trends. Deteriorating gross margin signals the opposite. Compare your COGS ratio to industry benchmarks to gauge competitiveness.
COGS includes only the direct costs of goods sold: materials, direct labor, manufacturing overhead. Operating expenses (SGA) include sales, marketing, administration, rent, and utilities not directly tied to production. COGS appears above gross profit on the income statement; operating expenses appear below it.
FIFO assumes oldest inventory is sold first — lower COGS and higher profit when prices rise. LIFO assumes newest inventory is sold first — higher COGS and lower taxable income when prices rise. Weighted average smooths costs across all units. The method chosen doesn't change physical inventory flow, only the accounting cost assignment.
Yes, but it's often called "cost of services" or "cost of revenue." For service businesses, COGS includes direct labor costs, subcontractor fees, materials used in service delivery, and software/tools directly tied to service delivery. It excludes administrative salaries and overhead.
Monthly for management reporting, quarterly for financial statements and tax estimates, annually for tax returns. Perpetual inventory systems calculate COGS in real-time with each sale. Periodic systems calculate COGS at the end of each accounting period using the inventory formula.
Common causes: rising raw material prices, higher labor costs, increased freight/shipping costs, inventory shrinkage (theft, damage, spoilage), less favorable supplier terms, or a shift in product mix toward higher-cost items. Identify the driver to determine the appropriate response (renegotiate, reprice, or improve efficiency).
No. COGS mathematically could be negative if ending inventory exceeds beginning inventory plus purchases (e.g., from a revaluation), but this indicates a data error. In normal operations, COGS is always positive. If ending inventory grew more than expected, double-check your purchase records and physical counts.