Most articles on how to calculate the cost of goods sold stop at the textbook inventory formula. That formula is correct, and you should know it. But if you run an operating Shopify or POD store, it hides the number that decides whether you keep the lights on: what each order truly costs you to fulfill.
This guide gives you both — the accounting formula every accountant expects, and the per-order version an operator uses to price products and read profit. It pairs with our ecommerce ops economics hub if you want the full money-mechanics picture.
The cost of goods sold calculation formula
The standard formula answers "how do you calculate cost of goods sold?" for any business that carries stock:
COGS = Beginning Inventory + Purchases − Ending Inventory
- Beginning inventory — the dollar value of unsold stock you carried in from the prior period.
- Purchases — everything you bought to produce or acquire sellable goods during the period (materials, packaging, direct labor, inbound freight).
- Ending inventory — the value of stock still on your shelf at period close.
Say you ran a small apparel store that stocked blanks. You opened the quarter with $18,000 of inventory, bought $9,400 more, and counted $12,100 left at the end. Your COGS is $18,000 + $9,400 − $12,100 = $15,300. That $15,300 is the direct cost of the goods you actually sold.
Why the inventory formula breaks for POD
Here is the catch the top-ranking pages skip. If you fulfill through Printify, Printful, or Gelato, you hold almost no inventory. Each item is printed after the customer buys it. Beginning and ending inventory are near zero, so the classic formula collapses into a simpler truth: your COGS is the sum of what your suppliers charged you for the orders that shipped.
That makes the per-order calculation the one that matters. It also raises the stakes on accuracy, because a printed item can't be restocked. When you refund a POD order, the production cost is gone for good — Printify only refunds to your account balance on its own defects and confirmed transit loss, not on buyer's remorse. Every dollar you misjudge in COGS is a dollar of phantom profit.
How to calculate cost of goods sold per order
Build the per-order landed cost from the supplier invoice, not from a guess:
Per-order COGS = Product (base) cost + Supplier shipping + Any add-ons (embroidery, extra print area, branding inserts)
Say you sell a tee that Printful bills at $13.00, with $5.00 supplier shipping and a $1.75 inside-label charge. Your per-order COGS is $13.00 + $5.00 + $1.75 = $19.75. If you sold 340 of them this month, your product-level COGS for that SKU is $19.75 × 340 = $6,715.
To turn that into a monthly total across the whole store, sum the landed cost of every order that fulfilled in the period. That total is your COGS. Our companion piece on how to find cost of goods sold walks through pulling those supplier line items cleanly.
Building a schedule of cost of goods sold
A schedule of cost of goods sold is just the formula laid out as a statement so anyone can audit the number. For a stock-holding store it looks like this:
| Line | Amount |
|---|---|
| Beginning inventory | $18,000 |
| Plus: purchases | $9,400 |
| Goods available for sale | $27,400 |
| Less: ending inventory | ($12,100) |
| Cost of goods sold | $15,300 |
For a POD store, the schedule swaps inventory movement for fulfillment cost:
| Line | Amount |
|---|---|
| Supplier base (product) cost, all orders | $5,780 |
| Plus: supplier shipping, all orders | $2,890 |
| Plus: print add-ons and inserts | $610 |
| Cost of goods sold | $9,280 |
Both schedules produce the single COGS figure that flows onto your income statement.
Cost of goods sold on the income statement
COGS sits directly below revenue and above gross profit. It's the first cost line, and it's what separates a business's direct product costs from its operating expenses like ads, apps, and salaries. Whether COGS is technically an "expense" trips a lot of owners up — we untangle that in is cost of goods sold an expense.
Gross profit = Revenue − COGS
Say your store did 340 orders at a $31 average order value: that's $10,540 in revenue. Subtract the $9,280 POD COGS from the schedule above and your gross profit is $1,260, a gross margin of roughly 12%. That number should stop you cold — because it does not yet include ad spend.
The variable cost of goods sold formula (and true profit)
The variable cost of goods sold formula isolates the costs that move with volume:
Variable COGS = Per-unit variable cost × Units sold
For POD, nearly all of your COGS is variable — you pay the supplier only when an order ships. That's a blessing for cash flow and a trap for pricing, because it's easy to celebrate revenue while variable costs quietly eat it.
Watch what happens when you add the cost the income-statement COGS line legitimately excludes. Take that same month: $10,540 revenue, $9,280 COGS, and $2,800 in Meta ad spend at, say, a $8.24 blended cost per acquisition.
| Line | Amount |
|---|---|
| Revenue (340 × $31) | $10,540 |
| Cost of goods sold | ($9,280) |
| Gross profit | $1,260 |
| Ad spend | ($2,800) |
| Net (before apps, fees, refunds) | −$1,540 |
The store is underwater even though gross profit looked positive. That gap — between COGS-only margin and true per-order profit — is where most POD stores unknowingly lose money, and it's the whole reason getting COGS exact matters before you layer costs on top.
The costs that make COGS accuracy non-negotiable
Two forces punish a sloppy COGS number for POD sellers specifically.
First, refunds destroy the full COGS, not just margin, because the printed item can't return to stock. On a typical ecommerce store a refunded item usually re-enters inventory; for you it's a total write-off of what you paid the supplier.
Second, chargebacks stack fees on top of the lost product. Shopify Payments charges US merchants a $15 chargeback fee per dispute, and a lost dispute typically runs two to two-and-a-half times the order value once you add unrecoverable COGS, shipping, and ad spend. With an average chargeback rate around 0.26% across ecommerce, even a low dispute count erases the profit on dozens of clean orders. If you want the mechanics of booking these hits correctly, see recording cost of goods sold.
Let an AI employee compute per-order COGS for you
Doing this by hand across hundreds of orders and two ad platforms is where accuracy dies. Victor, the AI employee from PodVector AI, connects to your Shopify store, Meta Ads, Google Ads, and your POD suppliers — Printify, Printful, and Gelato — and computes true per-order profit by pulling the real supplier cost against the real order and the real ad spend behind it.
Victor delivers the breakdown as a report to your Google Drive. He's an AI employee, not a dashboard — he does the reconciliation you'd otherwise do at midnight. Put Victor to work on your numbers.
If you're also cleaning up how your catalog and cost data are organized, the playbook in designing an ecommerce taxonomy pairs well with this.
FAQs
How do you calculate cost of goods sold?
Use Beginning Inventory + Purchases − Ending Inventory for a stock-holding business. For a print-on-demand store that holds no inventory, sum the landed supplier cost (product base cost + supplier shipping + any print add-ons) of every order that fulfilled during the period. Both approaches produce the same COGS line on your income statement.
What is the cost of goods sold calculation formula for a POD store?
Per-order COGS = product base cost + supplier shipping + add-ons, then summed across all fulfilled orders in the period. Because you print on demand, beginning and ending inventory are effectively zero, so the classic inventory formula reduces to the total you were billed by your suppliers.
What is the variable cost of goods sold formula?
Variable COGS = per-unit variable cost × units sold. For POD, almost all COGS is variable because you only pay the supplier when an order ships. That means your COGS scales directly with volume, so per-unit accuracy is what protects your margin as you grow.
Where does cost of goods sold appear on the income statement?
COGS is the first cost line, sitting directly below revenue and above gross profit. Revenue − COGS = gross profit. Operating costs like ad spend, apps, and salaries come after gross profit, which is exactly why a healthy-looking gross margin can still hide a net loss.
Does a refund on a POD order affect my COGS?
Yes, and harder than for a stocked store. The printed item can't be restocked, so the supplier cost you already paid is unrecoverable — you eat both the refund and the production cost. That's why building refunds and disputes into your real per-order profit, not just the raw COGS number, is essential.
What's the difference between COGS and true per-order profit?
COGS covers only direct product costs — supplier base cost, shipping, and add-ons. True per-order profit subtracts everything else that varies with the sale, most importantly ad spend and payment fees. A store can show positive gross profit on COGS alone and still lose money once acquisition cost is included, which is the trap this guide is built to help you avoid.