The cost of goods sold formula with sales and gross profit is simple: COGS = Sales − Gross Profit. Rearranged, Gross Profit = Sales − COGS, and Gross Profit Margin = Gross Profit ÷ Sales. The trap for a print-on-demand operator is that this formula stops at gross profit, which still sits well above the number you actually keep once ad spend and payment fees come out. This article walks the real per-order math on an operating store.

If you run a store with real sales history, you already know the textbook definition. You want to know what the formula leaves out — and why your bank balance never matches your "gross profit" line. Let's fix that.

The three forms of the formula

The relationship between sales, cost of goods sold, and gross profit is one equation written three ways. Each form answers a different question.

Solve for gross profit when you know your costs: Gross Profit = Sales − COGS. Solve for COGS when you know your margin off the income statement: COGS = Sales − Gross Profit. And the margin, which lets you compare across periods: Gross Profit Margin = (Sales − COGS) ÷ Sales × 100.

Cost of goods sold is the direct cost of the products you sold in the period — not what you spent on everything. For an inventory business it is calculated as beginning inventory plus purchases minus ending inventory, the standard formula QuickBooks lays out. For a print-on-demand store, it is simpler and more brutal, as the next section shows.

Why the inventory formula doesn't fit a POD store

The "beginning inventory + purchases − ending inventory" version assumes you buy stock, hold it, and count what's left. A POD seller holds nothing. Each unit is produced only after a customer orders it.

So your COGS for the period is just the sum of what your supplier billed you — base product cost plus the supplier's shipping — for every order you fulfilled. There is no ending inventory to subtract because there is no inventory.

That has a sharp consequence the general-accounting pages skip entirely: when you refund a POD order, the COGS is already spent and the item can't be restocked, so it is gone. We'll quantify that below. If you want the bookkeeping mechanics of logging these costs correctly, see our guide on recording cost of goods sold.

Worked example: an operating store

Say your store does 340 orders a month at a $31 average order value. That's monthly sales of 340 × $31 = $10,540.

Your supplier charges roughly $12.50 in base product cost and $4.50 in shipping per unit, so COGS per order is $17.00. Across 340 orders, COGS = 340 × $17.00 = $5,780.

Now run the formula both directions to confirm it ties out:

  • Gross Profit = Sales − COGS = $10,540 − $5,780 = $4,760
  • COGS = Sales − Gross Profit = $10,540 − $4,760 = $5,780 ✓
  • Gross Profit Margin = $4,760 ÷ $10,540 × 100 = 45.2%

A 45% gross margin looks healthy. The textbook pages would stop here and call it a good result — one ranking page notes that twenty percent or higher is "a solid baseline" for gross margin. But if you stop at gross profit, you are reading the wrong number for an ad-driven store.

Gross profit vs. the number you actually keep

Gross profit ignores two costs that dominate a POD P&L: paid acquisition and payment processing. Neither is COGS, so neither appears in the formula above — yet both come straight out of the same $31.

Say your Meta Ads spend is $2,800 for the month. Across 340 orders, that's $2,800 ÷ 340 = $8.24 of ad cost per order. Say payment processing runs about 3% plus thirty cents per order; on a $31 order that's roughly $0.93 + $0.30 = $1.23.

Here is the same order, fully loaded:

Per-order line Amount
Retail price (AOV) $31.00
− Product + shipping (COGS) −$17.00
= Gross profit per order $14.00
− Ad spend per order −$8.24
− Payment processing −$1.23
= Contribution per order $4.53

The formula told you $14.00 of gross profit per order. You actually keep about $4.53 before any fixed costs like your Shopify subscription, apps, or your own time. Monthly, that's gross profit of $4,760 against real contribution of 340 × $4.53 = $1,540.

That gap — $14.00 vs. $4.53 — is the whole reason the "sales minus gross profit" formula is a starting point, not an answer, for an operator buying traffic.

What actually belongs in COGS

Operators routinely mis-sort costs, which quietly distorts both the gross profit line and every margin decision built on it. Use this split:

  • In COGS: supplier base product cost, supplier print/production fee, supplier-charged shipping, and per-unit packaging the supplier bills.
  • Not in COGS (operating expenses below the line): ad spend, payment-processing fees, your Shopify plan, app subscriptions, design tools, and your salary.

Keeping ad spend out of COGS is correct accounting, but it's exactly why gross profit flatters a paid-acquisition store. The discipline is to read gross profit for product-level health and contribution per order for whether the business is actually making money. For the broader picture of how these lines interact, our ecommerce operations economics hub ties COGS, operating expenses, and unit economics together.

When a refund or chargeback detonates your COGS line

Because a printed item can't be restocked, a refund doesn't just reverse the sale — it burns the COGS too. On the $31 order above, a full refund means you return $31 to the customer and the $17.00 you already paid your supplier is unrecoverable. You're out $17.00 on a $31 order you no longer have revenue for.

A chargeback is worse. Shopify deducts the disputed amount plus a chargeback fee reported at $15 for US merchants, and win rates on disputes are low. Industry estimates put the true cost of a lost dispute at roughly two to two-and-a-half times the order value once you add the clawed-back amount, the fee, unrecoverable COGS, and the ad spend you already burned acquiring that customer.

Stack it on our example order: $31 clawed back + $15 fee + $17.00 sunk COGS + $8.24 spent on ads ≈ $71 gone on a single $31 sale. That's why disciplined COGS tracking has to extend to how often your margin leaks back out through refunds and disputes.

How understanding each category pays off

Thinking in operating-expense categories is the same discipline large operators apply to their filings — our breakdown of how to analyze operating expenses and a line-by-line read of Matson's 2023 operating expenses show the same logic scaled up: the headline margin means nothing until you know which costs sit in which bucket.

Pulling true per-order profit by hand across sales, supplier invoices, ad platforms, and fees is tedious, and most sellers do it in a spreadsheet once a quarter. Victor, the AI employee inside PodVector AI, computes true per-order profit from your live data — reading your Shopify orders, Meta Ads and Google Ads spend, and Printify, Printful, or Gelato supplier costs — and delivers the report to Google Drive. Every write action Victor takes is approval-gated, so you stay in control. It's not a dashboard you log into; it's an operator that does the reconciliation you've been skipping.

FAQs

What is the cost of goods sold formula using sales and gross profit?

COGS = Sales − Gross Profit. If your store did $10,540 in sales and the income statement shows $4,760 of gross profit, then COGS = $10,540 − $4,760 = $5,780. You can rearrange the same equation to Gross Profit = Sales − COGS when you know your costs instead of your margin.

Is gross profit the same as the profit I keep?

No. Gross profit is sales minus COGS only. It excludes ad spend, payment processing, subscriptions, and your time — all of which come out of the same revenue. On a paid-acquisition POD store, the money you actually keep (contribution per order) can be a fraction of gross profit, as the $14.00-vs-$4.53 example above shows.

Should ad spend be included in COGS?

No. Advertising is an operating expense, not a direct cost of producing the goods, so it sits below the gross profit line. That's standard accounting — but it's also why gross profit overstates the health of a store that buys most of its traffic. Track both numbers.

How do I calculate COGS for print on demand with no inventory?

Add up what your supplier billed you for every order you fulfilled in the period — base product cost plus supplier shipping and any per-unit fees. There's no "ending inventory" to subtract because POD holds no stock, so your COGS is simply the sum of supplier charges on fulfilled orders.

Why does a refund cost more than the refund amount for POD?

Because the item was printed on demand and can't be restocked, the COGS you already paid your supplier is unrecoverable. You refund the customer and eat the production cost, so a refunded $31 order with $17.00 of COGS leaves you down the full $17.00 with no product and no revenue to show for it.

What's a good gross profit margin for a POD store?

There's no universal number, and a high gross margin can still hide a money-losing store once ads are counted. The more useful target is a healthy contribution per order after ad spend and fees — that's the figure that tells you whether scaling spend makes you more money or less.