> Quick Answer: Enter your cost of goods and either a target profit margin or a target markup percentage, and this calculator converts between the two and computes the exact selling price each one produces.
Overview
Margin and markup are calculated from the same two numbers, cost and selling price, but they are not the same percentage, and confusing the two is one of the most expensive pricing mistakes a small business or reseller can make. Markup is profit expressed as a percentage of cost. Margin is profit expressed as a percentage of the selling price. A product marked up 100% over cost does not have a 100% margin; it has a 50% margin, and that gap between the two numbers is exactly where underpricing happens.
This calculator is built for retailers, wholesalers, freelancers, and product businesses setting prices from a known cost basis. It solves the conversion problem in both directions: give it a target margin and it tells you the selling price and the equivalent markup; give it a target markup and it tells you the selling price and the equivalent margin. That symmetry matters because different industries quote pricing differently, retail buyers often think in margin, distributors and manufacturers often think in markup, and moving between a supplier's markup language and your own margin-based pricing model is where the arithmetic errors creep in.
The tool also reports gross profit per unit in dollars, not just percentages, because a healthy-looking margin percentage on a low-cost item can still produce too little absolute profit to be worth the labor and overhead of selling it.
How This Is Calculated
Given cost C, a target margin m (as a decimal), and a target markup k (as a decimal), the calculator applies two independent formulas.
Price from a target margin, solved algebraically so that profit divided by the resulting price equals exactly m:
Price = Cost ÷ (1 − Margin)
Price from a target markup, where profit is simply cost times the markup rate:
Price = Cost × (1 + Markup)
Once a price is produced from either formula, the calculator computes the equivalent value in the other system for comparison:
Equivalent Markup (from a margin-derived price) = (Price − Cost) ÷ Cost Equivalent Margin (from a markup-derived price) = (Price − Cost) ÷ Price
The relationship between the two is not linear: Markup = Margin ÷ (1 − Margin), and Margin = Markup ÷ (1 + Markup). This is why a 50% margin equals a 100% markup, but a 50% markup only equals a 33.3% margin, and it is why the two figures diverge more sharply as the percentages get larger. All computations run through Decimal.js arbitrary-precision arithmetic so the conversion holds to the cent even at high markup multiples used in software, digital goods, and specialty retail.
Worked Example
Using the calculator's own baseline defaults: a $50 cost of goods, a 40% target margin, and a 66.67% target markup.
From the 40% margin target: Price = $50 ÷ (1 − 0.40) = $50 ÷ 0.60 = $83.33 Profit per unit = $83.33 − $50 = $33.33 Equivalent markup = $33.33 ÷ $50 = 66.67%
From the 66.67% markup target: Price = $50 × (1 + 0.6667) = $50 × 1.6667 = $83.34 Equivalent margin = ($83.34 − $50) ÷ $83.34 = 40.00%
Notice the two target inputs were chosen to be mathematically equivalent (40% margin corresponds to almost exactly 66.67% markup), and the two computed prices land a single cent apart ($83.33 vs. $83.34) purely from independent rounding on each side of the calculation, confirming the margin-to-markup relationship holds. This matches the calculator's verified test vector exactly.
For a second reference point, consider "keystone" pricing, a $100 cost doubled to a $200 selling price: that is a 50% margin ($100 profit ÷ $200 price) and simultaneously a 100% markup ($100 profit ÷ $100 cost), which is why "keystone" and "100% markup" and "50% margin" are all names for the same doubling-of-cost pricing rule.
What This Does Not Account For
- Payment processing fees, marketplace commissions, and sales tax. The margin and markup here are calculated on cost of goods versus list price only; a 15% marketplace commission or 3% card processing fee will erode the realized margin below what this calculator shows.
- Shrinkage, returns, and damaged inventory. Retail margin in practice is reduced by theft, spoilage, and returned merchandise, none of which this calculator models.
- Volume-based cost changes. If your supplier cost drops at higher order quantities, the cost of goods figure you enter should reflect the volume tier you actually plan to purchase at, not a list price.
- Landed cost components. For imported goods, "cost of goods" should already include freight, duties, and customs fees if you want a margin that reflects true profitability; the calculator takes whatever cost figure you enter at face value.
- Competitive and demand-based pricing constraints. This tool computes the price that achieves a target margin or markup mathematically; it does not check whether that price is competitive or acceptable to your market.
Common Pitfalls
- Using markup and margin interchangeably in conversation with a supplier or accountant. "We run a 50% markup" and "we run a 50% margin" describe very different profitability, a 50% markup on a $50 item yields a $75 price and 33.3% margin, while a 50% margin on that same $50 cost yields a $100 price. Always confirm which one is being discussed.
- Setting margin targets without checking absolute dollar profit. A 60% margin on a $10 item is $15 of price and only $6 of profit; if your overhead per transaction exceeds that, a high margin percentage can still lose money on low-cost items.
- Forgetting that markup percentages have no ceiling but margin percentages cap at 100%. Margin approaches but never reaches 100% as markup grows arbitrarily large (an infinite markup implies giving away the product for free relative to cost is impossible), which trips up people who try to apply margin math at very high multiples.
- Applying an average margin target uniformly across a product line with very different cost structures. A flat "40% margin on everything" policy can badly underprice low-cost, high-volume items relative to what the market would bear, or overprice big-ticket items relative to competitors.
- Confusing markup on cost with markup on selling price. Some industries, particularly certain retail and hospitality segments, quote "markup" as a percentage of the selling price, which is actually margin by another name. Confirm the convention before comparing numbers across sources.
Frequently Asked Questions
Is a 50% margin the same as a 50% markup?▸
Which one should I use to set my prices?▸
What is "keystone" pricing?▸
How do I convert a competitor's advertised margin into the markup I'd need to match their price?▸
Why did my two prices come out one cent apart in the worked example?▸
Sources
- American Institute of CPAs (AICPA), guidance on gross margin reporting under standard cost accounting
- U.S. Small Business Administration, pricing strategy resources for retail and wholesale businesses
- National Retail Federation, retail pricing and markup terminology standards
- Corporate Finance Institute, margin versus markup conversion methodology