Finance & business
Profit Margin Calculator
Price a product with confidence. Enter your cost and your revenue (selling price) to see the gross profit per sale, your profit margin as a percentage of revenue, and your markup as a percentage of cost. Margin and markup are the two numbers small-business owners, Etsy and Amazon sellers, restaurants, and freelancers in the U.S. mix up most often — and getting them backwards is the fastest way to underprice and lose money on every order. This calculator shows both side by side so you can set a price that actually hits the profit you want. It updates as you type, runs entirely in your browser, and shows both formulas below.
Pricing details
profit as a share of revenue
Margin and markup describe the same profit two ways — margin is a slice of the selling price, markup is added on top of cost.
How the profit margin calculator works
Your gross profit is simply revenue minus cost. From there, profit margin expresses that profit as a percentage of the selling price, while markup expresses it as a percentage of the cost. They answer different questions: margin tells you how much of each dollar of sales you keep; markup tells you how much you added to the cost to set the price.
Profit margin formula
margin = (revenue − cost) ÷ revenue × 100where: revenue = the selling price cost = the cost of goods revenue − cost = gross profit
Markup formula
markup = (revenue − cost) ÷ cost × 100where the same gross profit is measured against cost instead of revenue. A 50% margin equals a 100% markup; a 20% margin equals a 25% markup.
Notes & assumptions
- This is gross margin — it does not subtract overheads, taxes, shipping or marketing costs.
- Margin requires revenue greater than zero; markup requires cost greater than zero.
- If cost is higher than revenue you'll see a negative profit (a loss).
- Calculations are for general information only — verify before relying on them.
Margin to markup conversion table
Margin and markup convert with two short formulas. To turn markup into margin, divide the markup by one plus the markup: margin = markup ÷ (1 + markup). To turn margin into markup, divide the margin by one minus the margin: markup = margin ÷ (1 − margin). The table works the three most common retail markups in both directions, with a $10 cost so you can follow the dollars.
| Markup (on cost) | Margin (on price) | At $10 cost |
|---|---|---|
| 25% | 20% | price $12.50, profit $2.50 |
| 50% | 33.3% | price $15.00, profit $5.00 |
| 100% (keystone) | 50% | price $20.00, profit $10.00 |
Check the first row both ways: 0.25 ÷ (1 + 0.25) = 0.20, so a 25% markup is a 20% margin, and 0.20 ÷ (1 − 0.20) = 0.25 takes you straight back. The margin is always the smaller number of the pair because the same dollar profit is divided by the bigger base, the selling price. If a supplier talks in markup and your spreadsheet tracks margin, convert before you compare.
Worked example: pricing for a 40% margin
Say a product costs you $12 per unit and you want a 40% gross margin. The correct price is cost ÷ (1 − margin): 12 ÷ 0.60 = $20.00. Check it against the definition: gross profit is $8.00 and 8 ÷ 20 = 40% exactly.
The common mistake is applying a 40% markup instead: 12 × 1.40 = $16.80. That price earns only $4.80 per unit, and 4.80 ÷ 16.80 works out to a 28.6% margin, well short of the 40% you wanted. The shortfall is $3.20 on every unit, which is $1,600 of gross profit gone across a 500-unit order, even though both prices started from the same 40% target. Whenever a target is stated as a margin, divide the cost by one minus the margin; never just add the percentage on top of cost.
Gross vs operating vs net margin
This calculator returns gross margin: revenue minus the direct cost of goods, divided by revenue. Two other margins matter once you look at the whole business. Operating margin also subtracts operating expenses such as rent, payroll, software and marketing. Net margin subtracts everything, including interest and taxes, and is the share of each sales dollar you actually keep.
One pass through a small monthly P&L shows how the three shrink in order. Revenue is $10,000 and cost of goods is $6,000, leaving $4,000 of gross profit, a 40% gross margin. Subtract $2,500 of operating expenses and operating income is $1,500, a 15% operating margin. Subtract $500 of interest and taxes and net income is $1,000, a 10% net margin. A healthy gross margin can still end in a net loss if the middle layers get too heavy, so price with the full stack in mind and verify your real numbers with your accountant.
Frequently asked questions
What's the difference between margin and markup?
They describe the same gross profit measured against two different bases. Margin is profit as a percentage of the selling price (revenue), while markup is profit as a percentage of your cost. Because revenue is always larger than cost when you're profitable, the margin percentage is always smaller than the markup percentage on the same item — a 50% margin is a 100% markup, and a 20% margin is a 25% markup. Mixing them up is the single most common pricing mistake U.S. retailers make.
What is a good profit margin for a small business?
It depends heavily on your industry. Grocery and restaurants often run on thin single-digit net margins, while software and consulting can clear 50% or more. As a rough benchmark, many U.S. small businesses target a gross margin of 50% or higher on products so there's enough left to cover rent, payroll, marketing and taxes. Remember this tool shows gross margin only — your net margin after all overhead will be lower.
How do I calculate the selling price from a desired margin?
Divide your cost by one minus the margin (as a decimal). If an item costs $40 and you want a 60% margin, the price is 40 ÷ (1 − 0.60) = 40 ÷ 0.40 = $100. Don't simply add 60% to the cost — that gives you a 60% markup, which is only a 37.5% margin. To check your math, type the cost and that price into the calculator above and confirm the margin reads back as 60%.
Is this gross margin or net margin?
This is gross margin: revenue minus the direct cost of the product, divided by revenue. It does not subtract operating expenses like rent, salaries, shipping, payment-processing fees, advertising or taxes. Net (or net profit) margin accounts for all of those and is always lower. Use gross margin to price individual items and net margin to judge the health of the whole business.
Why is my margin negative?
A negative margin means your selling price is below your cost, so you lose money on every sale. The calculator shows this as a negative gross profit and flags that you're selling at a loss. Businesses sometimes do this on purpose for loss-leader promotions, but if it's unintentional, raise the price or lower the cost until the margin turns positive.
How do I convert markup to margin?
Divide the markup by one plus the markup, both as decimals. A 50% markup is 0.50 ÷ 1.50 = 0.333, which is a 33.3% margin. To go the other way, divide the margin by one minus the margin: a 20% margin is 0.20 ÷ 0.80, a 25% markup. The conversion table above lists the pairs sellers use most often.
What is keystone pricing?
Keystone pricing means doubling your cost, which is a 100% markup. It produces a 50% gross margin: an item that costs $10 sells for $20, so half of every sale is gross profit. Keystone is a traditional retail starting point, but it only works if a 50% margin actually covers your operating costs, so treat it as a default to adjust rather than a rule.