Simple ecommerce economics tool

Profit Margin Calculator

Enter selling price and total cost to calculate profit per sale, profit margin, markup and the selling price needed for your target margin.

Margin and markup are different: margin compares profit with selling price, while markup compares profit with cost. This calculator shows both so you can avoid mixing them up.

Margin Inputs

⚡ Real-time update
$
$

Include whichever per-sale costs you want the margin to reflect.

%
Optional cost breakdown
Profit / Sale
$0.00
Profit Margin
0.0%
Markup
0.0%
Cost % of Revenue
0.0%
Selling Price:$0.00
Total Cost:$0.00
Target Margin:0.0%
Price Needed for Target: $0.00
Planning estimate. The result only reflects the costs you include.
Quick formulas
Profit = Selling Price − Total Cost
Margin = Profit ÷ Selling Price × 100
Markup = Profit ÷ Total Cost × 100
Target price = Total Cost ÷ (1 − Target Margin)

How the Profit Margin Calculator Works

The calculator subtracts total cost from selling price to find profit per sale. It then expresses that profit as both margin and markup so you can compare two common profitability measures.

Margin vs Markup

Margin uses revenue as the denominator. Markup uses cost. For example, a product that costs $20 and sells for $30 earns $10 profit: margin is 33.3%, while markup is 50%.

Use Total Cost Consistently

If you want a pre-ad product margin, exclude ad spend. If you want a post-ad contribution margin, include ad cost. The calculator does not decide which business costs belong in the model; it calculates from the costs you choose to include.

Example: a $39.99 selling price with $28.16 total cost leaves $11.83 profit. That is about 29.6% margin and about 42.0% markup.

Frequently Asked Questions

Is profit margin the same as markup?

No. Margin divides profit by revenue, while markup divides profit by cost.

Should I include ad spend in total cost?

Include it if you want to measure profit after customer acquisition. Leave it out if you specifically want a pre-ad product margin.

Can this calculate a target selling price?

Yes. Choose a target margin and the calculator shows the selling price required to preserve that margin at the entered total cost.

Can I use this for services as well as products?

Yes. Use the sale price as revenue and enter the direct cost you want included in the margin calculation.