Margin Calculator
Find profit, gross margin, and markup from cost and revenue — or the price you need for a target margin.
Reviewed by the WorldCalcs team · Methodology · Last reviewed: July 2026
Gross margin
20.00%
Profit
10.00
Markup
25.00%
Results are estimates for general information only, not financial advice. See our Disclaimer.
What is profit margin?
Gross profit margin is the share of your selling price that is left over after you subtract what the item cost you. If a product costs 40 to make and you sell it for 50, your profit is 10 and your margin is 20% — because 10 is 20% of the 50 selling price. Margin is always measured against the selling price (revenue). That single detail is what separates margin from markup, which is measured against cost, and it is why the same money profit always looks like a smaller percentage as a margin than as a markup.
How margin is calculated
Start from the money profit, then divide by revenue:
- Profit = Revenue − Cost
- Gross margin % = (Profit ÷ Revenue) × 100
To work the other way — you know your cost and the margin you want — rearrange the formula to find the price you need to charge:
- Revenue = Cost ÷ (1 − Margin% ÷ 100)
Worked example
Say an item costs you 40 and you sell it for 50. Profit is 50 − 40 = 10, so the gross margin is 10 ÷ 50 = 0.20, or 20.00%. The same profit expressed against cost is 10 ÷ 40 = 25.00% markup. If instead you knew the cost was 40 and wanted a 30% margin, you would need to charge 40 ÷ (1 − 0.30) = 57.14, which locks in a 17.14 profit on every sale.
Related: flip it around with our Markup Calculator, measure returns with the ROI Calculator, take money off a price with the Discount Calculator, or crunch general ratios in the Percentage Calculator.
All calculations happen in your browser. Nothing is sent, stored, or tracked.
Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer
How to use
Pick a mode: enter cost and revenue to see the resulting profit and margin, or enter cost and a target margin to see the price you need to charge.
Margin is measured against the selling price, while markup is measured against the cost.
Frequently asked questions
What is a good profit margin?+
What is the difference between margin and markup?+
Is margin calculated on cost or on the selling price?+
Can a profit margin be more than 100%?+
How do I find the price for a 30% margin?+
What is the difference between gross margin and net margin?+
How do I convert a markup into a margin?+
Does this calculator use any tax rates or currency?+
Related calculators
- Loan Payment CalculatorMonthly payment, total interest and total cost of a loan.
- Compound InterestGrow savings with daily, monthly, quarterly or yearly compounding.
- Simple InterestInterest and final balance using the simple-interest formula.
- Savings CalculatorFuture value of an initial deposit plus monthly contributions.