How to Calculate Profit Margin — Formula, Markup & Ecommerce Costs

April 26, 20261 min readBy ProfitCalc
profitmarginpricingecommercehow to calculate profit margin

How to Calculate Profit Margin (Without Guessing)

Most ecommerce sellers think they know their margin, but they’re usually missing at least one of these:

  • Payment processing fees (percentage + fixed) — including Shopify fees
  • Shipping (or shipping subsidies)
  • Advertising cost per purchase (CPA)
  • Taxes (VAT/GST when prices are tax-inclusive)

Profit Margin Calculation Formulas

Net Profit per sale

Net Profit = Revenue (net of tax) − Product Cost − Shipping − Ad Spend − Platform Fees

Profit Margin %

Profit Margin % = (Net Profit ÷ Selling Price) × 100

Markup %

Markup % = ((Selling Price − Product Cost) ÷ Product Cost) × 100

How Do You Calculate Profit Margin Percentage?

1. Subtract every real cost from selling price 2. Divide the remainder by selling price 3. Multiply by 100

That is how to calculate a profit margin operators actually use — the same method behind our margin calculator tools.

A Real Example

Sell at $49.99:

  • Product cost: $15.00
  • Shipping: $4.50
  • Platform fee: 2.9% + $0.30
  • Ads per sale (CPA): $8.00

Run these in the calculators to see net profit, profit margin calculation, and daily/monthly/yearly projections.

👉 Shopify Profit Calculator USA

Tip: If you can’t confidently explain where every dollar goes, you’re not ready to scale spend.

← Back to Blog