πΉ Margin Calculator
Margin vs markup, and solve for price, cost, or profit from any two values.
Enter any two values and the calculator solves the rest.
Gross Profit per Unit
Estimates for planning only, not financial advice.
How to Use This Calculator
This calculator works with four linked values: cost, selling price, margin percent, and markup percent. Enter any two and it solves the other two. Leave a field blank (or zero, if you are solving for it) and press Calculate.
Enter any two known values. For a basic margin check, enter Cost and Selling Price. To price from a target margin, enter Cost and Margin. To find cost from a price and margin, enter Price and Margin.
Press Calculate. The solver picks the right formula for your combination and fills in all four values plus the per-unit profit.
Check the margin-vs-markup pair. If someone quoted you a "40 percent" number, this is where you confirm which one they meant.
Use Reset to clear all four fields, then try a different combination, such as the price you need for a 45 percent margin at your current cost.
The Margin and Markup Formulas
The only difference between the two metrics is the denominator. Margin divides profit by the selling price, the number your customer sees. Markup divides profit by your cost, the number you control. Because price is always bigger than cost (for a profitable sale), margin is always smaller than markup for the same transaction. The conversion formulas are exact, not approximations: a 25 percent markup is exactly a 20 percent margin, and a 20 percent margin is exactly a 25 percent markup.
Worked Example
Cost $100, selling price $150. Profit = $50. Margin = 50 / 150 = 33.33 percent. Markup = 50 / 100 = 50 percent. Now reverse it: you know cost is $100 and you want a 40 percent margin. Price = 100 / (1 - 0.40) = $166.67. If you had used a 40 percent markup by mistake, the price would be 100 x 1.40 = $140, and your real margin would be only 40 / 140 = 28.57 percent, a $26.67 pricing error on every unit.
Pricing With Margin Targets
Professional pricing starts from the margin you need and works backward to the price, never the other way around. Decide the margin that covers overhead, taxes, and profit, for example 50 percent for many service businesses or 60 to 70 percent for software, then apply price = cost / (1 - margin). Common traps to avoid: quoting markup when the client expects margin (or vice versa), forgetting that discounts come off the price and crush margin faster than expected (a 10 percent discount on a 30 percent margin product cuts profit by a third), and rounding the price down without rechecking the margin. Estimates for planning only, not financial advice.
Frequently Asked Questions
What is the difference between margin and markup?
Margin is profit as a percentage of the selling price: (price - cost) / price. Markup is profit as a percentage of the cost: (price - cost) / cost. A $100 cost sold for $150 gives a 33.33 percent margin but a 50 percent markup. Markup is always higher than margin for the same numbers, which is why mixing them up silently kills pricing.
How do I convert markup to margin?
Margin = markup / (1 + markup). A 50 percent markup converts to 0.50 / 1.50 = 33.33 percent margin. Going the other way, markup = margin / (1 - margin), so a 33.33 percent margin converts back to a 50 percent markup. This calculator runs both conversions instantly.
How do I set a price from cost and target margin?
Price = cost / (1 - margin). To earn a 40 percent margin on a $100 cost, price it at 100 / (1 - 0.40) = $166.67. If you mistakenly marked it up 40 percent instead, the price would be only $140 and your margin would be just 28.57 percent. Enter your cost and target margin in the calculator to get the right price.
Can margin be more than 100 percent?
No. Margin is profit divided by price, and profit can never exceed the price itself (that would require a negative cost), so margin tops out just under 100 percent. Markup, however, has no ceiling: a $10 cost sold for $100 is a 900 percent markup but a 90 percent margin. If your margin calculation exceeds 100 percent, check that you did not swap the formulas.
Why do businesses confuse margin and markup?
Because both describe "profit percentage" and sound interchangeable in conversation. A buyer who says "I need 40 percent margin" and a supplier who hears "40 percent markup" will price the same product $26.67 apart on a $100 cost. Always confirm which denominator the other party means before agreeing to a number.