Cost of Goods Sold (COGS) Calculator
Use this free cost of goods sold calculator app to instantly compute COGS, gross profit, and COGS percentage — whether you start from inventory data, sales figures, or your income statement. Three calculation modes are built in so you can work from whatever numbers you have on hand.
COGS Calculator — Choose Your Method
Please fill in Beginning Inventory, Purchases, and Ending Inventory.
Know your revenue and gross profit? Derive COGS instantly using the cost of goods sold formula with sales and gross profit.
Please enter both Net Sales and Gross Profit. Gross Profit cannot exceed Sales.
Our COGS percentage calculator shows what share of revenue is consumed by the cost of goods sold.
Please enter valid Sales and COGS values. COGS cannot exceed Sales.
What Is Cost of Goods Sold (COGS)?
Cost of Goods Sold (COGS) represents the direct costs a business incurs to produce or purchase the goods it sells during a specific accounting period. These costs include raw materials, direct labor, and manufacturing overhead directly tied to production. COGS does not include indirect expenses such as distribution costs, marketing, or general administrative overhead.
Understanding COGS is foundational to reading any income statement, setting profitable pricing, and managing inventory efficiently.
Cost of Goods Sold Formula
There are two primary ways to express the COGS formula, depending on what data you have available:
Standard Inventory Formula
Cost of Goods Sold Formula with Sales and Gross Profit
If you already know your revenue and gross profit — for example, from a published income statement — you can derive COGS directly:
Gross Profit Margin (%) = (Gross Profit ÷ Net Sales) × 100
COGS Percentage (%) = (COGS ÷ Net Sales) × 100
Both formulas are built into the calculator above, so you can choose whichever approach matches the data you have.
Cost of Goods Sold Example
Let’s walk through a practical cost of goods sold example for a small retail clothing company over one fiscal year:
| Item | Amount |
|---|---|
| Beginning Inventory (Jan 1) | $40,000 |
| + Purchases During the Year | $130,000 |
| = Goods Available for Sale | $170,000 |
| − Ending Inventory (Dec 31) | $35,000 |
| = Cost of Goods Sold | $135,000 |
| Net Sales | $200,000 |
| Gross Profit | $65,000 |
| Gross Profit Margin | 32.5% |
| COGS Percentage | 67.5% |
In this cost of goods sold example, for every $1 of revenue, the business spends $0.675 producing or purchasing the goods it sells — leaving a gross profit margin of 32.5%.
How to Calculate Cost of Goods Sold from an Income Statement
If you’re analyzing a company’s finances and only have access to a published income statement, you can still determine COGS with ease. Public income statements typically list Revenue, Cost of Revenue (which is COGS), and Gross Profit in the first few line items. The relationship is always:
For example, if a company reports $5 million in revenue and $2.1 million in gross profit, you immediately know COGS is $2.9 million. Enter those two figures into the Sales & Gross Profit tab of the calculator above to confirm and see additional metrics automatically.
When COGS is not separately stated — common in service-oriented businesses — look for “Cost of Services,” “Cost of Revenue,” or “Direct Costs.” For manufacturing companies, COGS may include a detailed schedule reconciling raw materials, work-in-process, and finished goods inventories.
COGS Percentage Calculator: What the Ratio Tells You
The COGS percentage (also called the cost-of-sales ratio) measures how efficiently a company converts revenue into gross profit. The formula is:
A lower COGS percentage means more gross profit is retained per dollar of revenue, which is generally favorable. Typical COGS benchmarks vary dramatically by industry:
| Industry | Typical COGS % | Typical Gross Margin % |
|---|---|---|
| Grocery / Food Retail | 70–80% | 20–30% |
| Apparel / Fashion Retail | 50–65% | 35–50% |
| Software / SaaS | 15–25% | 75–85% |
| Manufacturing | 60–75% | 25–40% |
| Restaurants | 28–35% | 65–72% |
| E-commerce | 40–60% | 40–60% |
Always compare your COGS percentage to industry peers rather than to an absolute benchmark. A 70% COGS ratio is excellent for a grocery chain but alarming for a software company.
Inventory Costing Methods That Affect COGS
The figure you calculate for COGS depends on the inventory costing method your business uses. The three most common methods are FIFO (First In, First Out), LIFO (Last In, First Out), and the Weighted Average Cost method. Each produces a different COGS and ending inventory value, which in turn affects gross profit and tax liability. FIFO is required under IFRS and generally accepted in most countries; LIFO is allowed only under US GAAP and is less common today.
Why COGS Matters for Business Decisions
Accurately tracking COGS enables better decisions across pricing, procurement, and financial planning. When your COGS percentage creeps up, it signals rising input costs, supplier price increases, or production inefficiencies — all of which compress margins if selling prices are not adjusted. Conversely, reducing COGS through better purchasing, lean production, or supplier negotiations directly expands gross profit without requiring a single additional sale.
Investors and lenders also scrutinize COGS trends. A widening gross margin over time suggests improving operational leverage, while shrinking margins may indicate competitive pricing pressure or cost inflation.