CyberMax
CyberMax › Answers

Profit margin formula in Excel, after every fee

Updated 2026-10-17 · Small business, landlords and freelancers · by CyberMax

Short answer

Margin % = (price - total cost) / price. Markup % = (price - cost) / cost. To hit a target margin, price = total cost / (1 - target margin). For online sales, total cost must include the payment fee, the platform fee, the shipping you pay and packaging, not just the product cost.

Copy-paste code

Row 2: B price, C cost of goods, D fee %, E fixed fee, F shipping, G packaging

Fees:               =B2*D2 + E2
Profit:             =B2 - C2 - (B2*D2 + E2) - F2 - G2
Margin %:           =Profit / B2
Markup %:           =(B2 - C2) / C2
Price for 40% margin (fee % in D2, fixed costs in C2+E2+F2+G2):
                    =(C2 + E2 + F2 + G2) / (1 - 0.40 - D2)
Example: a $40 sale
ItemAmount
Price$40.00
Cost of goods$15.00
Card fee 2.9% + $0.30$1.46
Marketplace fee 6.5%$2.60
Shipping you pay$6.50
Packaging$0.80
Profit$13.64 (34% margin)

Source: example numbers

Good to know

Margin and markup are not the same: a 50% markup is a 33% margin.

Marginmoor Seller Profit Tracker: See what you really keep from every sale

from $12

Marginmoor is a seller profit tracker (Excel and Google Sheets) that shows fees, shipping and real margin per order. The free Profit Margin Calculator does a quick single check.

Secure checkout · 14-day fix-or-refund if it doesn't work as described (terms)

Questions

What is a good margin?

It varies by industry; compare with your own fixed costs, not a rule of thumb.

Why divide by (1 - margin - fee %)?

Because percentage fees grow with the price, so they must come out of the denominator too.

Free: the Small Business Starter Kit

Bookkeeping and profit previews plus free invoice, rent receipt, margin and HACCP/allergen tools, then 5 short emails on margins, invoicing and checklists.

You get one email to confirm first. Then the kit, and 5 short emails over two weeks. One-click unsubscribe in every email; we never share your address.

Related answers

Cost per plate: work out food cost % and the right menu priceCost each plate from ingredient prices and portions, include yield loss, then price for a target food cost %. How IFTA fuel tax is calculated, step by stepIFTA in four steps: fleet MPG, taxable gallons per jurisdiction, tax due at each rate, minus tax paid at the p