5 minutes
Why Your COGS Number Never Matches Your Accountant's
If your monthly COGS number keeps coming out different from what your accountant produces, you're probably not making a math error. The gap almost always traces back to landed costs getting expensed wrong or returns that were never counted. Understanding how to calculate COGS correctly, going beyond the textbook formula to the real version with freight and adjustments, changes what you see in your margins every single month.
TLDR:
COGS formula: Beginning Inventory + Purchases and Direct Costs - Ending Inventory = COGS
71% of early-stage CPG brands skip landed cost at the SKU level, overstating every margin number
COGS benchmarks vary widely by vertical: beauty runs 20-40%, food and beverage runs 50-70%
A 5-point COGS improvement on $300K revenue adds $15,000 straight to contribution margin
Iris Finance automatically delivers COGS visibility at the SKU and channel level in real time, eliminating the per-channel margin erosion that blended reporting never surfaces
What Is Cost of Goods Sold (COGS)?
COGS is the total of direct costs tied to producing or acquiring the goods your brand actually sold in a given period. Raw materials, manufacturing labor, packaging, and the per-unit cost of purchased inventory all qualify. What separates COGS from everything else on your income statement is its direct connection to the product itself.
On the income statement, COGS sits immediately below revenue. Revenue minus COGS gives you gross profit. Everything below that line, including ad spend, outbound fulfillment, salaries, and SG&A, is an operating expense. That structural distinction matters because gross profit shows what remains before you run the business.
The boundary trips up a lot of ecommerce operators. Outbound shipping to your customer is generally an operating expense. Inbound freight to bring inventory into your warehouse is part of your landed cost and belongs in COGS. Marketing is always an operating expense, regardless of how performance-driven your spend is.
What Is Included in COGS for Ecommerce and CPG Brands
For most ecommerce and CPG brands, COGS includes:
Raw materials and component costs
Manufacturing or contract manufacturing labor
Inbound freight, import duties, and customs fees
Packaging (boxes, labels, inserts)
Warehouse receiving costs tied to getting inventory to a sellable state
What does not belong: outbound shipping to the customer, ad spend, creator fees, and channel commissions. These are operating expenses regardless of how variable they are.
The misclassification that costs brands the most is inbound freight. Freight and logistics costs represent 12-18% of product cost for most CPG brands, yet 71% of early-stage brands fail to track landed cost at the SKU level. That gap creates invisible margin erosion that compounds with every order shipped.
The Core COGS Formula
The formula itself is straightforward:
Beginning Inventory + Purchases and Direct Costs - Ending Inventory = COGS
Each variable has a specific meaning:
Beginning inventory: the value of unsold inventory carried into the period
Purchases and direct costs: everything added during the period, including raw materials, manufacturing labor, packaging, and inbound freight
Ending inventory: the value of unsold inventory remaining at period close
Here is a simple example using a CPG supplement brand:
Line Item | Amount |
|---|---|
Beginning inventory | $80,000 |
Purchases and direct costs | $120,000 |
Goods available for sale | $200,000 |
Ending inventory | $55,000 |
COGS | $145,000 |
On $300,000 in revenue, that gives you $155,000 in gross profit. The $55,000 in ending inventory rolls forward as next period's beginning inventory, which is how COGS and inventory stay connected across accounting periods.
Cost of Goods Manufactured (COGM) vs. COGS
COGM measures what it cost to finish manufacturing goods during a period. COGS measures what you sold. For brands that manufacture their own products, COGM is the input that feeds COGS.
The COGM formula:
Beginning WIP Inventory + Total Manufacturing Costs - Ending WIP Inventory = COGM
Total manufacturing costs include direct materials, direct labor, and manufacturing overhead like factory utilities and equipment depreciation. Once you have COGM, plug it into COGS:
Beginning Finished Goods + COGM - Ending Finished Goods = COGS
For a supplement brand that capsules its own product, a quick example: $15,000 beginning WIP plus $60,000 direct materials, $25,000 direct labor, and $10,000 manufacturing overhead, minus $12,000 ending WIP, gives COGM of $98,000. Add $30,000 beginning finished goods, subtract $22,000 ending finished goods, and COGS comes to $106,000.
If you purchase finished goods from a contract manufacturer, you skip COGM entirely. Your CPG unit economics model uses purchase cost as the direct input.
Inventory Costing Methods and How They Change Your COGS Number
The same physical inventory can produce different COGS numbers depending on how you assign cost to sold units. Three methods dominate: FIFO, LIFO, and weighted average cost.
Under FIFO (first in, first out), older inventory is expensed first. During inflationary periods, that means lower-cost units hit COGS first, producing a lower COGS figure and higher reported gross profit. Under LIFO (last in, first out), the newest and typically most expensive inventory is expensed first, raising COGS and reducing taxable income. Weighted average cost pools all inventory costs and divides by units, smoothing out price swings.
FIFO more closely mirrors how most brands actually move product, and LIFO is not permitted under IFRS, so international brands have no choice but to use FIFO or weighted average. How you value inventory also flows directly into gross margin return on inventory calculations.
How to Calculate COGS Percentage (COGS Margin)
COGS percentage (also called COGS margin) tells you what share of each revenue dollar goes toward producing what you sold:
COGS Percentage = (COGS ÷ Net Revenue) × 100
A lower COGS percentage leaves more gross margin to absorb ad spend, fulfillment, and overhead. A higher one compresses everything downstream.
What counts as a good number depends entirely on your category. Benchmarks by vertical show wide spread across CPG in 2026: beauty runs 20-40%, supplements 30-45%, apparel 35-55%, and food and beverage 50-70%. A food brand at 55% COGS is performing well. A beauty brand at the same number has a serious problem. For omnichannel CPG brand finance, comparing your COGS percentage against a blended ecommerce average gives you a benchmark that applies to nobody in particular.
Calculating COGS From the Income Statement and Balance Sheet
If you have financial statements but incomplete inventory records, you can reconstruct COGS two ways.
From the income statement: revenue minus gross profit equals COGS. If your income statement shows $400,000 in revenue and $160,000 in gross profit, COGS is $240,000.
From the balance sheet, use inventory movement across two periods: pull beginning inventory from the prior period balance sheet ($80,000), add purchases from your bank records or AP ledger ($120,000), and subtract ending inventory from the current balance sheet ($55,000) to arrive at COGS of $145,000. In a spreadsheet, the formula is simply =BeginningInventory+Purchases-EndingInventory. Cross-check against revenue minus gross profit. If they match, your books are clean.
How to Calculate COGS Without Ending Inventory
Mid-period, when no physical count exists, you can estimate ending inventory using the gross profit method and back into COGS from there.
The steps:
Multiply net sales by your expected COGS percentage to estimate COGS
Subtract that from goods available for sale to get estimated ending inventory
If your historical gross margin is 45%, COGS should be roughly 55% of net sales. On $200,000 in revenue with $180,000 in goods available for sale, estimated ending inventory is $70,000.
This works for interim reporting, insurance claims, or quick gut-checks. It falls apart when your product mix changes, margin varies by channel, or you are preparing audited financials. At that point, a physical count or perpetual inventory system is the only defensible answer.
Landed Costs, Returns, and Adjustments That Affect COGS
Landed costs are where the basic formula stops being enough. Every dollar you spend getting inventory to a sellable state belongs in COGS, beyond what you paid your manufacturer.
The full landed cost per unit includes:
Inbound freight (ocean, air, or domestic trucking) built into inventory cost before any unit sells
Import duties and customs fees added at the unit level
Port handling and warehouse receiving charges
Insurance on shipments in transit
If you pay $10,000 in ocean freight to bring in 5,000 units, each unit carries an additional $2.00 in COGS. Miss that, and every gross margin calculation you run is overstated.
Returns require a mirror adjustment. When a customer returns a product you can restock, you reverse the COGS recognized on that sale. Product you cannot resell gets written off as inventory shrinkage. Either way, the cost hits your P&L.
Promotional items create a similar gap. A free sample inserted in every order carries a real product cost. Revenue is zero on that unit, but COGS is not.
When landed costs, returns, and promotional items are properly folded into unit cost, the COGS number that comes out of your books and the one your accountant produces will match. That alignment is what makes SKU-level margin decisions defensible rather than directional.
COGS on the Income Statement vs. the Balance Sheet
COGS shows up in two places, and conflating them creates real reconciliation problems at month-end.
On the income statement, COGS is an expense recognized the moment a unit sells. On the balance sheet, unsold inventory sits as a current asset. Every sale converts a balance sheet asset into an income statement expense, dollar for dollar.
When you sell a unit with $8 in inventory cost, the balance sheet loses $8 from current assets and the income statement gains $8 in COGS. If your books show more COGS than the inventory reduction implies, something was miscounted or expensed at the wrong time.
Checking across periods follows a simple rule: beginning inventory from last period's balance sheet, plus purchases, minus ending inventory on the current balance sheet, should equal the COGS line on your income statement. When those numbers diverge, the culprit is usually a purchase that hit the P&L directly instead of being rolled into inventory cost first.
How COGS Affects Gross Profit, Contribution Margin, and Pricing Decisions
COGS is the first deduction from revenue, which makes it the lever with the widest downstream reach.
Gross profit is Revenue minus COGS. Gross margin is gross profit divided by revenue. From there, you deduct variable costs to reach contribution margin: merchant fees, outbound fulfillment, ad spend, and any variable channel costs. That waterfall looks like this for a DTC supplement brand:
Line Item | Amount | % of Revenue |
|---|---|---|
Revenue | $300,000 | 100% |
COGS | $105,000 | 35% |
Gross Profit | $195,000 | 65% |
Merchant fees | $9,000 | 3% |
Fulfillment | $21,000 | 7% |
Ad spend | $45,000 | 15% |
Contribution Margin | $120,000 | 40% |
A 5-point improvement in COGS percentage, from 35% to 30%, adds $15,000 directly to gross profit, and every dollar of that flows through to contribution margin unchanged. Understanding what sets the most profitable brands apart starts with this lever.
Pricing decisions live inside this math. If your landed COGS per unit is $12 and you price at $30, you have $18 in gross margin before a single operating dollar is spent. Price at $25 and that number drops to $13, which often isn't enough to absorb ad spend and still generate a positive contribution margin per order.
COGS Tracking in Practice: Real-Time vs. Period-End Calculation
Most brands calculate COGS once a month, after the books close. That means pricing and ad spend decisions run on cost data that is 15 to 30 days stale.
The two systems governing this are periodic and perpetual inventory. Periodic systems run a count at period end, then calculate COGS using beginning inventory plus purchases minus ending inventory. Perpetual systems update COGS with every transaction, so your cost of goods sold figure moves in real time as units ship.
For an omnichannel brand running Shopify, Amazon, and TikTok with separate 3PLs and inventory planning across multiple purchase orders in flight, periodic tracking creates a real decision gap. You don't know whether a campaign is profitable until the month closes, by which point the spend is already gone. The perpetual approach requires clean, SKU-level COGS data loaded before units start moving, but it produces daily gross margin visibility without waiting on your accountant, which is a key part of building a CPG tech stack that scales.
How Iris Finance Handles COGS for Omnichannel CPG Brands
Connecting COGS to a live financial system usually reveals something uncomfortable. The manually calculated estimate founders bring into Iris almost never matches what surfaces from order-level data. The gap is rarely a rounding error. It is typically landed costs that were period-expensed instead of rolled into unit cost, or bundle COGS approximated instead of built from actual components.
Iris ingests COGS from an ERP like NetSuite or Fulfil, or from a direct Google Sheet upload. The AI matches SKU names across POS systems and automatically resolves the vast majority of them. For bundles, brands can define individual components or upload a bundle total directly. Any SKUs the AI cannot confidently place are flagged and resolved before they affect your numbers, so the margin data you get is complete, not approximate.
Across roughly 500 brands and over $20B in GMV, daily contribution margin calculated from real-time, order-level data is the number Iris delivers automatically, with every channel fee, merchant cost, and fulfillment line built in at the order level, not a blended estimate assembled after the fact.
For brands moving off a monthly Excel model, an AI-powered profit planning platform automatically exposes the margin erosion by channel that was invisible in aggregate. A blended COGS percentage can look acceptable while one channel quietly destroys margin on every order. That only becomes visible when COGS is broken out at the SKU and channel level in real time, which Iris does without waiting on the books to close.
Final Thoughts on Cost of Goods Sold Formulas and Margin Calculations
COGS sits at the foundation of every margin metric you run, from gross profit down to contribution margin. Miss a cost category, and every number downstream is off by the same amount. Your pricing, ad spend, and channel decisions all depend on getting this right at the SKU level, not at the blended aggregate. Connect with our team to see what order-level COGS tracking looks like in practice.
FAQ
Why does my real-time contribution margin in Iris Finance not match my manual COGS calculation?
The gap almost always traces back to two sources: landed costs expensed as period costs instead of being built into unit cost, and promotional items or free gifts recorded at zero COGS when they carry real product cost. Iris surfaces this at the order level, so what looks like a rounding difference in a spreadsheet shows up as a structural margin problem across hundreds of SKUs.
How do I calculate COGS percentage from gross profit when I only have income statement data?
Subtract gross profit from revenue to get COGS, then divide COGS by revenue and multiply by 100. On a $400,000 revenue line with $160,000 gross profit, COGS is $240,000 and your COGS percentage is 60%. Cross-check that figure against your category benchmark: a 60% COGS percentage is acceptable for food and beverage but signals a serious margin problem for beauty or supplements.
What is the COGM formula and when does a CPG brand need it?
COGM (Cost of Goods Manufactured) equals Beginning WIP Inventory plus total manufacturing costs (direct materials, direct labor, and manufacturing overhead) minus Ending WIP Inventory. You need it when you manufacture your own product instead of buying finished goods from a contract manufacturer; COGM becomes the input that replaces purchases in your COGS formula.
How do I calculate COGS without ending inventory mid-period?
Multiply net sales by your historical COGS percentage to estimate COGS directly, then subtract from goods available for sale to back into estimated ending inventory. At a 55% COGS rate on $200,000 in revenue with $180,000 in goods available for sale, ending inventory estimates to $70,000. This works for interim reporting and gut-checks, but falls apart when channel mix changes or margins vary by SKU. At that point a perpetual inventory system is the only reliable answer.
What is a good COGS percentage for an ecommerce or CPG brand?
There is no single answer. Category determines the range. Beauty brands typically run 20 to 40% COGS as a percentage of revenue, supplements 30 to 45%, apparel 35 to 55%, and food and beverage 50 to 70%. A food brand at 55% is performing well; a beauty brand at the same number has a margin problem. Use the vertical ranges above to assess your position.
Related posts
Actionable data, proven strategies, and clear forecasts, empowering you to make smarter decisions and scale with confidence.





