Profit Margin Calculator
Enter your cost and selling price — or a target margin or markup — to see profit, margin and markup side by side.
Gross margin
37.5%
Selling price
80.00
Profit
30.00
Markup
60.0%
Margin vs markup
Margin is profit divided by revenue — the share of each sale you keep. Markup is profit divided by cost — how much you add on top of what you paid. The same sale always has a higher markup than margin: buy at 50, sell at 100, and you have a 50% margin but a 100% markup.
Estimates only — gross figures before fees, shipping and taxes. Calculated on your device; nothing is sent anywhere.
How it works
- Pick a mode: cost and revenue, cost and target margin, or cost and target markup.
- Type your numbers — the profit, selling price, gross margin and markup update as you type.
- Read the results panel to see how margin and markup differ for the same sale, and adjust until the pricing works.
Frequently asked questions
- What is the difference between margin and markup?
- Margin is profit as a percentage of revenue; markup is profit as a percentage of cost. A product bought for $50 and sold for $100 has a 50% margin but a 100% markup — same sale, two different reference points. Mixing them up is one of the most common pricing mistakes, because pricing with a 30% markup when you intended a 30% margin quietly cuts your profit.
- How do I calculate selling price from cost and target margin?
- Divide the cost by one minus the margin expressed as a decimal: price = cost ÷ (1 − margin). For a $40 cost and a 25% target margin, the price is 40 ÷ 0.75 = $53.33. The calculator’s margin mode does this for you and also shows the equivalent markup, so you can hand a single consistent number to whoever sets prices.
- Why can’t a margin be 100% or more?
- Margin is profit divided by revenue, and profit can never exceed revenue when the product costs anything at all, so margin approaches 100% but never reaches it. Markup has no such ceiling — a 900% markup is perfectly possible. If someone quotes a margin above 100%, they almost certainly mean markup.
- Is my pricing data private?
- Yes. The calculator runs entirely in your browser with plain JavaScript — nothing you type is uploaded, stored or sent to any server. You can safely enter real costs, supplier prices and planned retail prices without them leaving your device.
- What counts as a good gross margin?
- It varies widely by industry. Grocery retail often runs on 10–15% gross margins, restaurants around 60–70% on food, and software frequently above 80%. Compare against businesses similar to yours rather than a universal number, and remember gross margin still has to cover rent, wages, marketing and every other operating cost before anything is profit.
About this tool
This profit margin calculator works in three directions. Give it a cost and a selling price and it returns your profit, gross margin percentage and markup percentage. Give it a cost and a target margin and it works backwards to the selling price you need to charge. Give it a cost and a markup instead and it prices the product that way — while always showing the equivalent margin, so the two numbers can never be confused again.
Everything is computed instantly in your browser as you type; no figures are sent to a server, so real supplier costs and planned prices stay on your device. The math itself is simple but easy to get wrong under pressure: margin is profit divided by revenue, markup is profit divided by cost. The calculator keeps both on screen for every calculation, which makes the relationship concrete — a 50% margin is always a 100% markup, a 20% margin is a 25% markup, and so on.
Typical uses: a reseller checking what a wholesale price leaves after fees, a freelancer converting a day-rate cost into a quoted price at a target margin, an online seller comparing two suppliers at the same retail price, or a small shop translating an accountant’s margin target into the markup its point-of-sale system expects. Because results update live, it also works well for quick what-if runs — what happens to margin if the supplier raises cost by 8%, or if you discount the price by 10%.
Two practical tips. First, decide as a business whether you talk in margin or markup and stick to it; the calculator translates between them whenever you meet someone using the other convention. Second, remember this is gross margin — it covers only the direct cost of the product. Payment processing, shipping, returns and advertising all come out of that margin, so build in room before the number looks comfortable.