Profit margin formula, worked through for a COD store
The formula is one line. Getting the right numbers into it is the hard part — especially under cash on delivery, where a sale is not a sale until the parcel is delivered and the courier has paid.
The formulas
- Gross profit margin = (Revenue − Cost of goods) ÷ Revenue × 100
- Net profit margin = (Revenue − All costs) ÷ Revenue × 100
- Markup = (Price − Cost) ÷ Cost × 100 — not the same thing as margin
Gross profit margin, with an example
A suit sells for Rs 2,000 and costs you Rs 1,200.
Gross margin = 800 ÷ 2,000 × 100 = 40%. The markup on the same suit is 800 ÷ 1,200 = 66.7%. Confusing the two is the most common pricing mistake: a "40% markup" is only a 28.6% margin.
Net profit margin: where the real costs go
Net margin subtracts everything else it took to sell the suit. For a Pakistani COD store that means:
- Forward freight, and packaging
- Ad spend per order
- GST on the courier's charge
- 2% income-tax and 2% sales-tax withheld from delivered COD
- The cost of returns — freight both ways on parcels that earned nothing
Why COD makes the formula lie
Run the formula on orders placed and it overstates the margin, for three reasons:
- Refused parcels are in the revenue. Across the stores we measure, 27.5% of COD parcels were returned. They should never have been counted as revenue.
- Their freight is not in the costs. Every return cost freight out and back; that cost has to be spread over the parcels that did deliver.
- Withholdings are invisible. 4% of delivered COD never reaches you, because the courier deducts it before paying.
The fix is to compute margin on delivered and paid orders, with return costs spread across them. The full sequence is in how to calculate true net profit on a COD order.
Try it on your numbers
The COD profit calculator takes price, product cost, freight, return rate and ad spend and shows the net margin per delivered order — the version of this formula that matches your bank account.
Get net margin per order, automatically — install freeAbout the author: Hamza Khalid is the founder of Remap Media, which builds Kaarobar. He built Mydrobe.pk, a cash-on-delivery fashion store on Shopify, in 2020 and runs Cellwala.pk. He has spent 10+ years in performance marketing on Meta, Google and TikTok for brands in Pakistan, the UAE, Qatar and the US. More about Hamza
Questions merchants actually ask
- What is the formula for gross profit margin?
- Gross profit margin = (Revenue − Cost of goods sold) ÷ Revenue × 100. A product selling for Rs 2,000 that cost Rs 1,200 has a gross margin of 40%.
- What is the difference between margin and markup?
- Margin divides profit by the selling price; markup divides profit by the cost. The same Rs 800 profit on a Rs 1,200 cost is a 66.7% markup but a 40% margin.
- What is a good net profit margin for an online store in Pakistan?
- It depends heavily on category and return rate, so there is no honest single figure. What matters more is computing it correctly: on delivered and paid orders, after freight both ways, packaging, ads and the 4% withholding.