LineNow
Use CasesPartnersProcurementSuppliersResources
LoginBook a Demo
LineNow
  • Use Cases
  • Suppliers
  • Pricing
Login
Book a Demo
Line Now Logo
Procurement and supplier operations — simplified.Based in Seattle, WA

Products

  • Purchase order software
  • Purchase order tracking
  • Supplier management
  • Inventory replenishment
  • Procurement platform
  • Supplier catalogs
  • Pricing

Solutions

  • Restaurant purchasing
  • Manufacturing purchasing
  • Central purchasing
  • Dropshipping
  • Regulated purchasing
  • Supplier order intake
  • All purchasing use cases

Integrations

  • Shopify purchasing
  • Square purchasing
  • Lightspeed purchasing
  • QuickBooks Online
  • All integrations

Resources

  • Buying guides
  • Software comparisons
  • Buyer insights
  • All articles
  • Free purchasing tools
  • Free templates
  • Rollout checklist

Company

  • Why LineNow
  • Book a demo
  • Help Center
  • Contact
PrivacyTermsEditorial standards
© 2026 Line Now LLC
Home/Blog/Glossary/Cost of Goods Sold: Formula and Purchasing Inputs
GlossaryProcurement encyclopedia

Cost of Goods Sold: Formula and Purchasing Inputs

Distinguish purchasing inputs, inventory valuation and expense recognition when calculating cost of goods sold.

Jainul Vaghasia/Published May 25, 2026/Updated September 4, 2026/8 min read

Use the definition

Turn procurement terms into an operating system.

This reference page should help you understand the concept first. When the term affects purchasing execution, LineNow connects it to live POs, supplier replies, receiving, and accounting handoff.

Retail Replenishment, Complete: From Reorder Points to Reconciled CostsInventory replenishment

Contents

  1. Quick answers
  2. The formula, unpacked
  3. COGS by industry
  4. Why procurement directly controls COGS
  5. Why most SMBs don't know their real COGS
  6. The COGS-to-accounting pipeline
  7. Purchasing records support the accounting calculation
  8. Related
Back to top

Cost of goods sold (COGS) is the total direct cost of producing or acquiring the goods a business sells during a period — including raw materials, ingredients, components, wholesale purchase prices, and direct labor tied to production. Distinguish acquisition or production cost from the timing at which that cost becomes an expense on sale.

Quick answers

What is cost of goods sold? COGS is the direct cost of the goods you sold. For a retailer, it is what you paid your suppliers for the products on the shelf. For a restaurant, it is the ingredient cost of every dish served. For a manufacturer, it is the raw materials and direct labor that went into the finished product. COGS appears on the income statement directly below revenue — revenue minus COGS equals gross profit.

What is the COGS formula? Beginning Inventory + Purchases − Ending Inventory = COGS. Beginning inventory is what you had on hand at the start of the period. Purchases is everything you bought from suppliers during the period. Ending inventory is what remains unsold at the end. The difference is what was consumed — your cost of goods sold.

What is the difference between COGS and operating expenses? COGS is the direct cost of producing or acquiring the goods you sell — materials, ingredients, wholesale product cost. Operating expenses (opex) are the indirect costs of running the business — rent, utilities, salaries for non-production staff, marketing, insurance, software. COGS scales with sales volume. Opex is largely fixed regardless of how many units you sell in a given period.

What is a good COGS percentage? Use consistent cost classification and compare the resulting gross profit with the operating costs it must cover. Ingredient-only food cost is not directly comparable with a manufacturer's COGS including labor and production overhead.

Is COGS the same as food cost? In restaurants, food cost is the COGS for food items specifically. Beverage cost is COGS for beverages. Combined, they make up the restaurant's total COGS. The terms are used interchangeably in food service, but COGS is the broader accounting term that applies across all industries.

Read before ordering

A dense operator briefing for teams that need sharper buying, cleaner supplier follow-up, and fewer expensive surprises.

The formula, unpacked

COGS = Beginning Inventory + Purchases − Ending Inventory

Each variable carries a procurement implication:

Beginning inventory is the ending inventory from the prior period. Its accuracy depends on whether the prior period's receiving, consumption tracking, and physical counts were reliable. If receiving variances went unrecorded last month, beginning inventory this month is wrong before the period even starts.

Purchases is the total cost of goods bought from suppliers during the period. This should reflect the actual price paid — including any price changes, substitutions, or negotiated adjustments that occurred after the purchase order was placed. If the PO said $5.00/unit but the supplier confirmed $5.25/unit and the system never updated, purchases is understated.

Ending inventory is what remains on hand at period end. Determined by physical count, perpetual inventory system, or a combination. Shrinkage, spoilage, and unrecorded consumption all create gaps between the system's ending inventory and reality. Every dollar of untracked shrinkage understates ending inventory and overstates COGS — or, if the shrinkage is never captured, the error accumulates silently until the next physical count forces a correction.

COGS by industry

Manufacturing inventory cost can include conversion costs, including direct labor and production overhead; a purchases-only formula is a simplified trading-stock example. See the IFRS Foundation's IAS 2 summary for the scope of inventory cost under that framework.

Compare periods only after aligning revenue scope, opening and closing valuation, purchase returns, transfers and the treatment of losses. A purchasing price change reaches COGS according to the inventory and accounting policy; it is not necessarily expensed when the PO changes.

Why procurement directly controls COGS

COGS is reported by accounting, but it is determined by procurement. Every procurement decision directly sets a COGS input:

Supplier pricing — the price negotiated with each supplier for each item is the unit cost that flows into COGS. A 5% price increase across a supplier's catalog raises COGS by that percentage on every unit sold. Many SMBs discover price increases when the invoice arrives. A procurement system that tracks price changes at the PO confirmation stage catches them before they hit the P&L.

Substitutions — when a supplier substitutes a different product at a different price and the operator accepts, COGS changes at that moment. If the substitution is captured on the purchase order, the cost change is visible. If it is buried in an email thread, the cost change is invisible until the invoice arrives — or never, if the invoice is paid without matching.

Receiving variances — if 100 units were ordered and 92 arrived, the COGS per unit sold rises because the fixed procurement cost (ordering, freight, handling) is spread across fewer units. Structured receiving that reconciles against the PO catches this immediately. Informal receiving misses it entirely.

Waste and yield — a recipe calling for 200g of salmon per plate with a 75% yield requires purchasing 267g per plate. If the procurement system does not account for yield, the operator under-orders, the kitchen runs short, and either production stops or an emergency purchase at a premium price fills the gap — both of which raise effective COGS.

Why most SMBs don't know their real COGS

The COGS formula is simple. Getting accurate inputs is not.

Purchases are estimated, not matched. Most SMBs calculate purchases from invoices paid, not from PO-to-receiving-to-invoice matched records. If an invoice includes a price change the operator never agreed to, it flows into COGS unchallenged. If a receiving shortage was never recorded, the invoice overstates what was actually received and used.

Inventory counts are infrequent. The formula requires accurate beginning and ending inventory. Many SMBs count inventory monthly or quarterly. Between counts, COGS is an estimate based on purchases alone — which ignores shrinkage, spoilage, and the difference between what was purchased and what was actually consumed.

Recipe costs are static. Restaurants and manufacturers set recipe costs when the recipe is created. Ingredient prices change weekly. Without dynamic BOM costing linked to current supplier prices, the per-unit COGS used for menu pricing and margin analysis is based on stale data.

Freight and handling are excluded. The invoice price is not the full cost. Freight, duties, and handling add to the true landed cost of each item. Most SMBs book freight to a generic shipping expense account rather than allocating it to specific inventory items. COGS is understated by the freight component, and gross margin is overstated by the same amount.

The COGS-to-accounting pipeline

In a well-structured operation, COGS flows through a defined pipeline:

  1. Purchase — a PO is created with agreed prices and quantities. This is the cost commitment.
  2. Supplier confirmation — the supplier confirms, modifies, or requotes. The PO updates to reflect the actual agreed cost.
  3. Receive — goods arrive. Quantities are verified against the confirmed PO. Price per unit is confirmed or adjusted. Inventory is updated at the received cost.
  4. Match — the supplier invoice is compared against the confirmed PO and the receiving record. Matching within tolerance means the cost data is clean. Variances are flagged and resolved.
  5. Accounting handoff — the matched, reconciled cost data flows to QuickBooks, Xero, or whatever accounting system the business uses. COGS entries are based on verified purchase prices and confirmed received quantities, not raw invoice totals.

When any step in this pipeline is manual, informal, or missing, the COGS number in the accounting system is an approximation. It may be close. It may not. The operator cannot tell without reconstructing the trail from PO through receiving to invoice — which is exactly the forensic exercise that three-way matching is designed to prevent.

Connecting the pipeline also collapses the time cost: Verve Bowls, a multi-location food business, cut ordering from roughly 6 hours to about 40 minutes per location per week once the steps ran in one system.

Purchasing records support the accounting calculation

LineNow connects purchase orders, supplier-confirmed changes and receiving, with supported allocation of order charges and accounting handoff. Recipes and component records can help inspect how an input price affects an estimated product cost.

Demonstrate a partial receipt, an additional freight charge, a supplier credit and a bill handoff. The accounting owner should then confirm inventory valuation, expense classification and when COGS is recognized. A received-cost record or a bill export is not itself a complete COGS ledger.

Related

  • Purchase Price Variance (PPV): Formula, Causes, and Why Procurement Decides It — unfavorable PPV flows directly into COGS; tracking PPV as supplier replies and receipts arrive reveals how much of COGS variation is procurement price discipline vs. market movement
  • FIFO, FEFO, and LIFO: Inventory Valuation Methods and Picking Policies — the costing method (FIFO, LIFO, or WAC) determines which purchase costs enter COGS first
  • Weighted Average Cost (WAC): Formula, Periodic vs. Perpetual, and When AVCO Fits — the third GAAP/IFRS-accepted costing method; how moving average WAC keeps COGS current after every receipt
  • GMROI (Gross Margin Return on Investment)
  • Inventory Turnover: Formula, Benchmarks, and What Drives It
  • Landed Cost: Formula, What It Includes, and How It Changes Your Procurement Math
  • Three-Way Matching: What It Is, How It Works, and Why It Breaks at SMB Scale
  • Gross Margin: Formula, Benchmarks, and How Procurement Controls It — gross profit is revenue minus COGS; gross margin converts that to a percentage of revenue, and procurement decisions control COGS on both sides of the formula
  • Cash Conversion Cycle (CCC): Formula, Benchmarks, and Why It Predicts SMB Survival
  • Bill of Materials (BOM): Single-Level, Multi-Level, and Why Recipes Are BOMs
  • Closed-Loop Procurement: Forecast, Buy, Receive, Repeat
  • Food Cost Percentage: Formula, Benchmarks, and Why Procurement Determines It — food cost % is the restaurant-specific application of COGS as a share of revenue; the same four-stage procurement pipeline that controls COGS determines whether theoretical and actual food cost % align
cost of goods soldCOGSCOGS formulacost of goods sold formulaCOGS meaninghow to calculate COGSCOGS vs operating expenses

Written by Jainul Vaghasia

Jainul Vaghasia builds LineNow, the purchasing and inventory platform for SMBs. He writes from operator interviews, customer implementations, and the live purchasing workflows LineNow runs for restaurants, retailers, and ecommerce brands.

Editorial standards and corrections

Recommended next

Continue with a relevant guide or purchasing workflow.

Explore the buying process, compare software, or see how a customer handles similar supplier work.

Retail Replenishment, Complete: From Reorder Points to Reconciled CostsConnect reorder policies, packs, supplier communication, physical receiving and cost review with current platform-specific guides and tools.Best Inventory Replenishment Software: Compare Planning and ExecutionCompare replenishment tools for retail, restaurants, stockrooms and manufacturing, with a worked order calculation and a repeatable forecast-and-receipt trial.Inventory replenishmentReview demand, supplier packs and outstanding orders before buying more stock.PricingCheck the trial, business-unit pricing and what is included.
Share on X