BUSINESS
COGS Calculator - Cost of Goods Sold Calculator
By Worldtickers ·
Calculate your total cost of goods sold to understand production costs and improve gross margin.
This cogs tool focuses on calculating your total cost of goods sold to understand production costs and improve gross margin. Use it to turn operating metrics into practical business insight by entering costs, revenue, customers, margins, or growth assumptions and reviewing the numbers behind better decisions.
Calculator
COGS Calculator
Calculate your Cost of Goods Sold from inventory and production costs.
COGS
$0.00
COGS as % of Revenue
0.00%
What Is COGS
Cost of Goods Sold, commonly abbreviated as COGS, represents the direct costs a business incurs to produce or acquire the products it sells during a specific period. COGS is one of the most important financial metrics because it directly determines your gross profit — the difference between what you sell something for and what it cost you to produce or acquire it. Gross profit is the foundation of profitability; without it, no business can survive.
For a manufacturer, COGS includes raw materials, direct labor (the workers who physically build the product), manufacturing overhead (factory utilities, equipment depreciation, factory rent and maintenance), and freight-in costs (shipping raw materials to the factory). For a retailer or wholesaler, COGS is primarily the purchase price from suppliers plus any costs to get the product ready for sale — shipping, customs duties, and initial handling. For a service business, the equivalent concept is "cost of revenue" and includes the direct costs of delivering the service.
COGS is subtracted from revenue to arrive at gross profit, which appears as the first profitability line on an income statement. Gross profit margin — the percentage of revenue remaining after COGS — is a key indicator of production efficiency and pricing effectiveness. A business with a 60% gross margin retains $0.60 of every revenue dollar to cover operating expenses and generate profit.
Tracking COGS accurately is essential for pricing decisions, tax reporting, and financial analysis. Understating COGS leads to overstated profits and potential legal issues. Overstating COGS leads to understated profits and missed opportunities. The calculator below helps you compute COGS using the standard inventory formula, whether you use FIFO, LIFO, or weighted average inventory valuation.
How to Use This Calculator
Enter your beginning inventory value, purchases during the period, direct labor costs, manufacturing or production overhead, and ending inventory value. The calculator computes your total COGS and COGS as a percentage of revenue.
Beginning Inventory
The total value of inventory at the start of the period. This includes raw materials, work-in-progress, and finished goods. The beginning inventory of one period is the ending inventory of the previous period. Use the same valuation method (FIFO, LIFO, or weighted average) consistently across periods.
Purchases and Direct Costs
Include all raw material purchases, freight-in charges, and any other costs directly attributable to acquiring inventory. For a manufacturer, include direct labor and manufacturing overhead. For a retailer, the purchase price from suppliers is the primary input. Do not include operating expenses like marketing or office rent here — those are not part of COGS.
Ending Inventory
The value of inventory remaining at the end of the period. This subtracts from your total available inventory to give you the cost of what was actually sold. Ending inventory should be valued using the same method as beginning inventory for consistency. Accurate physical counts are essential — inventory shrinkage (theft, damage, obsolescence) affects your ending inventory and therefore your COGS.
Formula
COGS = Beginning Inventory + Purchases + Direct Labor + Overhead − Ending Inventory
COGS Ratio = COGS / Revenue × 100
Gross Profit = Revenue − COGS
Gross Profit Margin = (Revenue − COGS) / Revenue × 100
Examples
Example 1: Retail Store
Beginning inventory: $80,000. Purchases during the quarter: $200,000. Freight-in: $5,000. Ending inventory: $60,000. COGS = $80,000 + $200,000 + $5,000 − $60,000 = $225,000. If quarterly revenue was $350,000, COGS ratio = $225,000 / $350,000 = 64.3%. Gross margin = 35.7%. The store retains $0.357 of every revenue dollar to cover operating expenses.
Example 2: Manufacturing Company
Beginning inventory (raw materials + WIP + finished goods): $150,000. Raw material purchases: $400,000. Direct labor: $180,000. Manufacturing overhead: $120,000. Ending inventory: $100,000. COGS = $150,000 + $400,000 + $180,000 + $120,000 − $100,000 = $750,000. If annual revenue was $1,200,000, COGS ratio = 62.5%, gross margin = 37.5%. The manufacturer retains $0.375 per revenue dollar.
Example 3: Impact of Inventory Shrinkage
Beginning inventory: $50,000. Purchases: $150,000. Ending inventory (physical count): $35,000. COGS = $50,000 + $150,000 − $35,000 = $165,000. But if expected ending inventory was $45,000 and the actual count is $35,000, the $10,000 difference (shrinkage) is embedded in COGS. COGS is now $165,000 instead of $155,000, reducing gross margin by a corresponding amount. Tracking shrinkage separately helps identify theft, damage, or counting errors.
Tips
Choose an Inventory Method and Stick With It
FIFO, LIFO, and weighted average produce different COGS numbers from the same underlying transactions. FIFO (first in, first out) assigns the oldest costs to COGS, which in inflationary environments produces lower COGS and higher profit. LIFO (last in, first out) assigns the newest costs to COGS, producing higher COGS and lower profit. Weighted average smooths out price fluctuations. Choose the method that best reflects your business and apply it consistently.
Conduct Regular Inventory Counts
Accurate COGS depends on accurate inventory counts. Discrepancies between book inventory and physical inventory directly affect your COGS calculation. Conduct physical inventory counts at least quarterly, and investigate any significant variances. Inventory management software with barcode scanning or RFID can dramatically improve accuracy.
Separate Direct and Indirect Costs
A common error is including costs in COGS that belong in operating expenses, or vice versa. Sales commissions, marketing costs, and administrative salaries are operating expenses, not COGS. Factory rent and manufacturing supervisor salaries are COGS, not operating expenses. Getting this classification right is important for accurate gross margin calculation and financial reporting.
Monitor COGS Trends
Track your COGS as a percentage of revenue over time. If it is increasing, your gross margin is shrinking — either your costs are rising or your prices are not keeping up. A rising COGS ratio is an early warning sign that needs investigation. It could indicate supplier price increases, production inefficiencies, waste, or pricing pressure from competitors.
FAQ
What does COGS include?
COGS includes all direct costs attributable to the production of goods sold by a company. This encompasses raw materials, direct labor costs, manufacturing overhead (factory utilities, equipment depreciation, factory rent), and freight-in costs. For a retailer, COGS is primarily the purchase price from suppliers plus shipping. COGS does not include indirect expenses like sales commissions, marketing, office rent, or executive salaries.
What is the difference between COGS and operating expenses?
COGS represents direct costs tied to producing the goods or services sold — raw materials, direct labor, and manufacturing overhead. Operating expenses (OpEx) are indirect costs required to run the business — rent, salaries, marketing, utilities, and insurance. COGS appears above the gross profit line on an income statement; operating expenses appear below it. The distinction matters because gross profit (Revenue − COGS) measures production efficiency, while operating profit (Revenue − COGS − OpEx) measures overall management efficiency.
How does inventory affect COGS?
COGS is calculated differently depending on the inventory method used. Under the periodic system, COGS = Beginning Inventory + Purchases − Ending Inventory. Under the perpetual system, COGS is updated in real-time with each sale. The inventory valuation method (FIFO, LIFO, or weighted average) also affects COGS. In a rising price environment, FIFO produces lower COGS and higher profit, while LIFO produces higher COGS and lower profit (and lower taxes).
What is a good COGS percentage?
A good COGS percentage depends on your industry. Software companies often have COGS below 20% of revenue (mostly hosting and support). Manufacturing typically runs 50–70% of revenue. Retail runs 60–80%. Grocery stores run 75–85%. The lower your COGS percentage, the higher your gross margin. The key is to benchmark against your specific industry and track your own trend over time. A rising COGS percentage signals cost problems that need attention.
How can I reduce my COGS?
Strategies to reduce COGS include negotiating better prices with suppliers (volume discounts, longer contracts), finding alternative suppliers, improving production efficiency (reducing waste, automation), optimizing inventory management (reducing carrying costs and obsolescence), cross-training workers to improve labor productivity, and investing in better equipment that reduces material waste. However, cutting COGS too aggressively can compromise product quality, which can hurt revenue and brand value.
Is COGS tax-deductible?
Yes, COGS is a business expense that reduces taxable income. COGS is subtracted from revenue before calculating gross profit, and gross profit is the starting point for calculating taxable income. This is why LIFO is sometimes used for tax purposes — it produces higher COGS in inflationary environments, which reduces taxable income. However, LIFO conformity rules require that if you use LIFO for taxes, you must also use it for financial reporting.
What is the difference between COGS and cost of revenue?
For product businesses, COGS and cost of revenue are essentially the same thing. For service and subscription businesses, cost of revenue is the more common term and includes direct costs of delivering the service — hosting costs, customer support labor, direct software licensing costs, and onboarding expenses. The concept is the same: these are the direct costs attributable to generating revenue. The terminology difference reflects whether the business sells physical products (COGS) or services (cost of revenue).
How do I calculate COGS for a service business?
For a service business, COGS (or cost of revenue) includes the direct costs of delivering the service: contractor or consultant labor, direct software or tool costs used in delivery, hosting or cloud infrastructure costs, and direct project expenses. It does not include sales, marketing, or administrative costs. For example, a consulting firm's COGS would be the salaries of consultants who bill clients, not the salaries of the sales team or the office rent.