Cost of goods sold calculator for retail stock
Combine opening stock value, net vendor purchases, landed freight and closing physical counts to find direct merchandise expense and gross margin.
Measure the direct cost of merchandise sold across a month, quarter or fiscal year, and optionally compare it against net revenue to view gross profit dollars and gross margin percentage. Independent shop owners and bookkeepers can run this free cogs calculator right in the browser with no sign-in or data uploads.
How to compute cost of sales
- Enter your beginning inventory at cost from the opening balance sheet or prior physical stocktake.
- Enter net merchandise purchases for the period after deducting vendor returns, allowances and early-pay discounts.
- Enter inbound freight-in and landed import duties paid to bring stock to your store (enter 0 if already included in purchase invoices).
- Enter ending inventory at cost from your closing physical count, plus optional net sales for the same period (enter 0 to skip gross profit).
- Select Calculate to see goods available for sale, direct merchandise expense and gross margin, or select Use example to load the sample quarterly figures below.
The periodic inventory equation
Goods available for sale = beginning inventory + net purchases + freight-in
Direct merchandise sold = goods available for sale − ending inventory
Gross profit = net sales − direct merchandise sold
Gross margin (%) = (gross profit ÷ net sales) × 100
Under the standard formula of cost of goods sold, opening stock plus net additions establishes the full pool of merchandise on hand during the period. Subtracting unsold stock left on shelves at period end isolates the inventory consumed by customer orders. Keeping every input on a consistent cost basis prevents retail ticket prices from distorting the cost of goods sold equation.
Small business tax rules for inventory valuation and calculating cost of sales are detailed in IRS Publication 334 and IRS Publication 538. Overhead expenses such as store rent, sales-floor wages, utilities and marketing belong below gross profit as operating expenses rather than inside merchandise cost. Accounting rules depend on your jurisdiction and tax election; this page is not tax or accounting advice.
Worked example: quarterly retail stock reconciliation
Meadow Corner Home Goods reconciles Q2 stock using $28,000 in opening inventory at cost, $45,000 in net wholesale purchases, $2,000 in inbound carrier freight, $25,000 in counted closing stock and $90,000 in net register sales:
| Input | Value |
|---|---|
| Beginning inventory at cost | $28,000 |
| Net purchases during the period | $45,000 |
| Freight-in and landed duties | $2,000 |
| Ending inventory at cost | $25,000 |
| Net sales for the period | $90,000 |
Adding $28,000 + $45,000 + $2,000 yields $75,000 in goods available for sale. Subtracting $25,000 of closing stock leaves $50,000 in merchandise sold. Against $90,000 in net sales, the shop earns $40,000 in gross profit, equal to a 44.44% gross margin.
Turn merchandise cost into stock efficiency metrics
Feed your period merchandise expense straight into the inventory turnover calculator to check how many times capital cycled through shelves, and pair gross profit dollars with average stock cost in the GMROI calculator. To break shipment freight and customs tariffs down to individual SKUs before receiving, open the landed cost calculator. Note that Headoffis tracks unit counts, reorder points and sales imports in stock and sales without acting as an accounting ledger or valuation engine.
Frequently asked questions
Are freight in and customs duties part of inventory cost?
Yes. Inbound shipping, insurance in transit and import tariffs required to bring wholesale goods into salable position at your warehouse or store count as inventoriable acquisition cost, whereas outbound delivery to customers is a selling expense.
What happens if ending inventory exceeds goods available?
Closing stock at cost cannot exceed opening stock plus net purchases and freight-in unless a delivery invoice was omitted, vendor returns were double-counted, or closing units were mistakenly priced at retail instead of wholesale cost. Reconcile cutoffs before closing the period.
Related free tools
Explore Headoffis features for managing your stores, stock and team.