Pricing & Margin Calculator
100% private — runs on your device, never uploaded. Works offline once loaded.
Work pricing in both directions: enter a unit cost and a target margin to get the price, or enter a price and discount to see the resulting margin, markup and profit per unit.
Margin and markup are not the same number
The most expensive mistake in pricing is treating margin and markup as interchangeable. Both express profit as a percentage, but they divide by different things. Margin divides profit by the selling price; markup divides profit by the cost. Because the price is always larger than the cost, the margin percentage is always smaller than the markup percentage for the same sale.
Take a unit that costs $20 and sells for $50. The profit is $30. As a margin that is 30 / 50 = 60%. As a markup that is 30 / 20 = 150%. A supplier who tells you they add a 150% markup and a finance report that shows a 60% margin can be describing the identical transaction. Knowing which base you are working from is the difference between a healthy business and one that quietly loses money on every sale.
Pricing to hit a target margin
When you want a specific margin, the instinct is to add that percentage to the cost. That is wrong, and it undershoots every time. Adding 60% to a $20 cost gives $32, which is only a 37.5% margin, not 60%. The reason is that the margin is measured against the final price, which you do not yet know.
The correct formula solves for price directly: price = cost / (1 − margin). For a 60% target on a $20 cost, that is 20 / (1 − 0.60) = 20 / 0.40 = $50, which delivers exactly 60%. This tool uses that formula in margin mode, so the selling price it returns will always produce your intended margin. Margins of 100% or more are impossible because they would require an infinite or negative price, so the tool caps input below 100%.
- Price from margin: price = cost / (1 − margin)
- Profit per unit: profit = price − cost
- Gross margin: margin = profit / price
- Markup on cost: markup = profit / cost
Working backwards from a price and discount
The second mode answers the opposite question: given a price you already charge and a discount you are considering, what margin and profit are you left with? First the tool computes the net price after discount as list price × (1 − discount). Then profit is that net price minus cost, margin is profit divided by the net price, and markup is profit divided by cost.
This matters because discounts hit profit disproportionately. If your margin is 40% and you offer a 20% discount, you are not giving away 20% of profit, you are giving away roughly half of it, because the discount comes entirely out of the margin, not the cost. Seeing the post-discount margin before you launch a promotion stops you from running sales that lose money on every order.
Where these numbers stop and judgement begins
This is a unit-economics calculator: it works out gross margin on a single unit, which is the foundation of pricing but not the whole story. It deliberately ignores fixed costs like rent, salaries, and software, so a healthy gross margin does not by itself mean the business is profitable once those overheads are covered.
For subscription and SaaS products, remember that unit cost should reflect the true marginal cost of serving one more customer, including support, payment fees, and infrastructure, not just an obvious cost of goods. Blend this margin view with volume, customer acquisition cost, churn, and lifetime value before setting a final price. The calculator sharpens the maths so your judgement can focus on the strategy.
Frequently asked questions
Why can't I just add my target margin percentage to the cost?
Because margin is measured against the selling price, not the cost. Adding 60% to a $20 cost gives $32, which is only a 37.5% margin. To actually hit 60% you divide by one minus the margin: 20 / 0.40 = $50. The tool does this for you in margin mode.
What margin should a SaaS or software product aim for?
Software typically carries very high gross margins, often 70% to 90%, because the marginal cost of serving one more user is low. But make sure your unit cost captures the real cost to serve, including support, payment processing, and hosting, or the margin will look better than it is.
How much does a discount really cost me?
More than the discount percentage suggests, because it comes straight out of profit rather than cost. Use the price-and-discount mode: enter your list price and the discount, and the tool shows the net price, the profit that remains, and the reduced margin so you can decide whether the promotion is worth it.
What does a negative margin mean?
It means the selling price, after any discount, is below your unit cost, so you lose money on every sale. The tool shows the profit and margin in red in that case. It is a signal to raise the price, cut the discount, or reduce the cost before selling.
Does this account for fixed costs and overheads?
No. It calculates gross margin on a single unit, which excludes fixed costs like rent, salaries, and subscriptions. A strong gross margin is necessary but not sufficient for overall profitability, since those overheads must still be covered by total gross profit across all units sold.
Is my pricing data kept private?
Yes. All calculations run entirely in your browser with JavaScript. Nothing you enter is uploaded, logged, or stored on any server, so you can model confidential costs and margins with complete privacy.
Advertisement