Free Profit Margin Calculator
Calculate gross profit, profit margin and markup from cost and selling price, or work backwards from a target margin to the selling price you need.
Margin and markup from your selling price
Selling price from a target margin
Profit margin, markup and gross profit explained
Pricing a product or service is easier when the three main figures are kept separate. Gross profit is the amount left after subtracting purchase cost from selling price. Profit margin expresses that gross profit as a percentage of the selling price. Markup expresses the same gross profit as a percentage of cost. This calculator shows all three so you can check a price without confusing margin with markup.
The tool runs entirely in your browser. It does not send your figures to an external calculation service, store them in a database or require registration. Currency selection changes only the display symbol and formatting; it does not perform foreign-exchange conversion.
Formulas used
Gross profitSelling Price − Cost
Profit marginGross Profit ÷ Selling Price × 100
MarkupGross Profit ÷ Cost × 100
Target selling priceCost ÷ (1 − Target Margin ÷ 100)
Worked example: calculate margin and markup
Suppose a retailer buys an item for $60 and sells it for $100. Gross profit is $100 − $60 = $40. Profit margin is $40 ÷ $100 × 100 = 40%. Markup is $40 ÷ $60 × 100 = 66.67%. The business earns $40 of gross profit per item. If it sells 25 items, total gross profit is $1,000 before overhead, tax and other expenses.
Worked example: set a price from a target margin
Suppose the complete cost is RM75 and the target gross margin is 25%. Required selling price is RM75 ÷ (1 − 0.25) = RM100. At that price, gross profit is RM25, which is 25% of the RM100 selling price. The equivalent markup is 33.33%, demonstrating why a 25% margin is not the same as a 25% markup.
How to use the calculator
- Select a display currency. Use the same currency for cost and selling price.
- Enter purchase cost and selling price. Quantity is optional and defaults to one.
- Read gross profit per unit, total gross profit, profit margin and markup as you type.
- For price planning, enter cost and a target profit margin in the reverse calculator.
- Use Copy Results to place a plain-text summary on your clipboard, or Reset to start again.
Handling zero values and losses
A zero selling price makes profit margin undefined because the formula would divide by zero. A zero cost makes markup undefined for the same reason. The calculator still reports gross profit or loss, rather than hiding the result. When selling price is below cost, the negative gross profit, negative margin and negative markup correctly indicate a loss. For reverse calculations, any target margin below 100% is supported; a target of 100% or more is invalid for a positive cost.
What to include in cost
For a useful commercial estimate, purchase cost should reflect the costs directly attributable to obtaining or producing one saleable unit. Depending on the business, that may include supplier price, inbound freight, customs duty, packaging, marketplace fees or direct labour. Fixed overhead such as rent, salaries, software and marketing is not automatically included. Gross profit is therefore not the same as net profit.
If costs vary by quantity, calculate with the expected unit cost for the order size being evaluated. For services, cost can represent direct labour and directly attributable delivery expenses. Use consistent assumptions when comparing products or scenarios.
Frequently asked questions
What is the difference between profit margin and markup?
Profit margin divides gross profit by the selling price. Markup divides gross profit by the cost. Because they use different bases, the percentages are not interchangeable.
Can I use currencies other than US dollars?
Yes. Choose a common currency or select Other. No exchange rate is used, so enter cost and selling price in the same currency.
How do I calculate a selling price from a target margin?
Divide cost by one minus the target margin as a decimal. For example, a 25% target margin on a cost of 75 requires a selling price of 100.
Why is a target margin of 100% not allowed?
At a positive cost, the formula would divide by zero. A selling price cannot produce a 100% gross margin when the item has a positive cost.
What happens when the selling price is below cost?
Gross profit, margin and markup become negative, clearly showing a gross loss.
Are tax, shipping and payment fees included?
Only if you include them in the purchase cost. The calculator uses the figures you enter and does not add taxes, fees or overhead automatically.
