COGS Calculator
Calculate your Cost of Goods Sold (COGS) and analyze product profitability. Enter your inventory and purchase data to instantly compute COGS, gross profit, and gross margin. Switch to detailed mode to include labor, overhead, and freight costs.
COGS = Beginning Inventory + Purchases - Ending Inventory
Quick examples:
Value of inventory at the start of the period
Total inventory purchases during the period
Value of inventory remaining at the end of the period
Gross profit and margin will be calculated
Total sales revenue for the same period
COGS Analysis
Cost of Goods Sold
Gross Profit
Gross Margin
Cost Ratio
Revenue Split
Cost Component Breakdown
($250,000.00 total inputs)Related Calculators
How COGS Is Calculated
Cost of Goods Sold measures the direct costs attributable to goods sold by a company. It is a fundamental metric for understanding product profitability and is required for computing gross profit on the income statement. This calculator supports two modes to accommodate different business types.
Basic COGS Formula
COGS = Beginning Inv + Purchases - Ending Inv
The standard formula used by retailers and resellers. Start with the inventory you had at the beginning of the period, add everything you purchased, then subtract what remains unsold at the end.
Detailed COGS Formula
COGS = Begin Inv + Purchases + Labor + Overhead + Freight - End Inv
The expanded formula for manufacturers and producers. It adds direct labor costs, manufacturing overhead, and freight-in charges to capture all production costs that flow through inventory.
Gross Profit
Gross Profit = Revenue - COGS
Once you know your COGS, subtract it from total revenue to determine gross profit. This tells you how much money is left to cover operating expenses and generate net income after accounting for the direct costs of your products.
Gross Margin %
Gross Margin = (Gross Profit / Revenue) x 100
Gross margin percentage expresses gross profit as a share of revenue. A higher margin means more of each sales dollar is available for operating expenses and profit. This metric is critical for pricing decisions and competitive analysis.
Tips for Reducing COGS
Negotiate Supplier Pricing
Building strong relationships with suppliers and negotiating volume discounts can meaningfully reduce your material costs. Consider consolidating purchases with fewer suppliers to increase your leverage, or explore alternative suppliers who can offer competitive pricing without sacrificing quality.
Reduce Waste and Spoilage
Manufacturing waste and inventory spoilage directly increase COGS without generating revenue. Implement quality control processes, improve storage conditions, and use just-in-time ordering for perishable goods to minimize losses.
Improve Production Efficiency
Streamlining production processes reduces both labor and overhead costs. Invest in employee training, optimize workflows, and consider automation for repetitive tasks. Even small efficiency gains compound over time into significant COGS reductions.
Optimize Inventory Levels
Excess inventory ties up capital and increases storage, insurance, and obsolescence costs. Use demand forecasting and reorder point analysis to maintain just enough stock to meet demand without overcommitting resources to unsold goods.
Common Use Cases
Retail and E-commerce
Retailers use COGS to track the cost of merchandise purchased for resale. For e-commerce businesses, COGS also includes shipping costs to receive inventory (freight-in). Tracking COGS by product category helps retailers identify which product lines are most profitable and which may need pricing adjustments or discontinuation.
Manufacturing
Manufacturers include raw materials, direct labor, and factory overhead in COGS. Accurate COGS tracking is essential for pricing products competitively while maintaining profitability. The detailed mode of this calculator is designed for manufacturing businesses that need to account for all production costs.
Restaurants and Food Service
Restaurants track food cost (a component of COGS) as a percentage of menu price. Industry benchmarks suggest food costs should be 28-35% of revenue. Adding direct labor (kitchen staff) gives a "prime cost" that most restaurant operators aim to keep below 60-65% of revenue.
Small Business Accounting
Small business owners need COGS for tax reporting (Schedule C for sole proprietors, Form 1125-A for corporations). Accurate COGS reduces taxable income and ensures compliance with IRS requirements. This calculator helps verify COGS figures before entering them on tax forms.
What This Calculator Assumes
- •Valuation-method agnostic: The calculator uses the standard COGS formula without assuming FIFO, LIFO, or Weighted Average. Enter inventory values based on your chosen valuation method.
- •Single period: Results reflect one analysis period. For trend analysis, calculate COGS for multiple periods and compare results over time.
- •Same currency: All values are assumed to be in the same currency with no exchange rate adjustments.
- •No returns or allowances: The calculator does not deduct purchase returns, purchase discounts, or sales returns. Adjust your purchase figures accordingly before entering them.
Disclaimer: This tool provides estimates for business planning and analysis purposes. It is not a substitute for professional accounting advice. For tax filings and significant business decisions, consult with a qualified accountant.
Frequently Asked Questions
What is Cost of Goods Sold (COGS)?
Cost of Goods Sold (COGS) is the total direct cost of producing or purchasing the goods a company sells during a specific period. It includes the cost of materials and direct labor used to create the product, as well as manufacturing overhead directly tied to production. COGS is subtracted from revenue to determine gross profit and is a key metric on the income statement.
How do I calculate COGS?
The basic COGS formula is: Beginning Inventory + Purchases - Ending Inventory = COGS. For manufacturers, the detailed formula also adds Direct Labor, Manufacturing Overhead, and Freight-In costs before subtracting ending inventory. This calculator supports both basic and detailed modes to handle either scenario.
What is the difference between COGS and operating expenses?
COGS includes only the direct costs of producing or acquiring goods that were sold. Operating expenses (OPEX) include indirect costs like rent, utilities, marketing, administrative salaries, and office supplies. COGS appears on the income statement before gross profit, while operating expenses are deducted after gross profit to arrive at operating income. Keeping these separate is essential for accurate financial analysis.
What is a good gross margin percentage?
A good gross margin varies significantly by industry. Software companies typically achieve 70-85% gross margins, while retail businesses often see 25-50%. Grocery stores may operate on 20-30% margins, and manufacturing companies typically range from 25-45%. The key is to compare your gross margin against industry peers and track it over time to ensure profitability is trending in the right direction.
Does COGS include labor costs?
COGS includes only direct labor — the wages and benefits paid to workers who are directly involved in producing the goods. For example, factory assembly line workers and machine operators are direct labor. Administrative staff, salespeople, and managers are classified as operating expenses, not COGS. Use the Detailed mode in this calculator to include direct labor in your COGS calculation.
What is the difference between COGS and cost of sales?
For product-based businesses, COGS and cost of sales are essentially the same thing. However, service businesses often use "cost of sales" or "cost of revenue" instead, since they do not sell physical goods. Cost of sales for a service company might include direct labor, subcontractor costs, and materials used to deliver services. The formula structure is similar, but the inputs differ based on business type.
How does COGS affect taxes?
COGS is deducted from revenue to calculate gross profit, which directly reduces taxable income. A higher COGS means lower gross profit and therefore lower taxes. This is why accurate COGS tracking is important — understating COGS leads to overpaying taxes, while overstating it can trigger IRS scrutiny. Ensure all legitimate direct costs are included in your COGS calculation.
What inventory valuation methods affect COGS?
The three main inventory valuation methods are FIFO (First-In, First-Out), LIFO (Last-In, First-Out), and Weighted Average Cost. FIFO assumes older inventory is sold first, resulting in lower COGS during inflation. LIFO assumes newer inventory is sold first, yielding higher COGS. Weighted Average uses the mean cost of all inventory. This calculator uses the basic COGS formula regardless of valuation method — you input the values based on your chosen method.
Why is my COGS negative?
A negative COGS means your ending inventory is greater than the sum of beginning inventory plus purchases and other direct costs. This usually indicates a data entry error, but can also occur if significant inventory was received but not yet recorded as a purchase, or if inventory was revalued upward. Verify your beginning inventory, purchases, and ending inventory figures if you see a negative result.
How often should I calculate COGS?
Most businesses calculate COGS at least quarterly for management reporting and annually for tax filings. However, businesses with high-volume inventory movement (retail, food service) benefit from monthly COGS calculations to spot trends early. The more frequently you track COGS, the sooner you can identify cost increases and take corrective action to protect margins.