A free online profit margin calculator that computes profit, margin %, and markup % from cost and selling price — or solves backward for the selling price or maximum cost needed to hit a target margin. Includes a per-unit and total-profit breakdown.
Margin vs. markup — the difference that trips everyone up
Profit margin is profit as a percentage of your selling price (revenue): (Selling price − Cost) ÷ Selling price × 100. Markup is profit as a percentage of your cost: (Selling price − Cost) ÷ Cost × 100. The same $40 profit on a $60 cost and $100 selling price is a 40% margin but a 66.7% markup — two very different numbers describing the same sale.
How the calculator solves for selling price or cost
If you know your cost and want a target margin, the calculator finds the selling price using Selling price = Cost ÷ (1 − Margin ÷ 100). If you know your selling price and want a target margin, it finds the maximum cost using Cost = Selling price × (1 − Margin ÷ 100). Both are algebraic rearrangements of the margin formula.
Scaling to total profit
Enter the number of units sold to see total revenue, total cost, and total profit alongside the per-unit numbers — useful for checking whether a per-unit margin actually adds up to a meaningful profit at your expected sales volume.
Common Mistakes to Avoid
Confusing margin with markup
Solution:
Setting a markup % when a margin % target was intended
Solution:
Forgetting that margin can't reach 100%
Solution:
Ignoring per-unit costs beyond the direct cost of goods
Solution:
Using average cost instead of the cost of the specific item
Solution:
Assuming a higher price always means a higher margin
Solution:

