Margin Calculator — Price It Right, Keep Your Cut
Enter your cost and selling price to instantly see profit, profit margin, and markup — the three numbers every seller needs before setting a price.
Your pricing
🔒 All calculations happen in your browser — no data leaves your device.
Your margin
- Margin divides profit by the selling price; markup divides it by cost — so markup is always the bigger number on a profitable sale.
- At the defaults — cost $60, price $100 — profit is $40.00, the margin is 40.00% and the markup is 66.67%.
- Mixing the two up is the classic pricing mistake: a “40% markup” on a $60 cost prices at $84, whose true margin is only 28.57% — the target-margin field solves the price backwards instead.
Enter your cost and selling price to instantly see profit, profit margin, and markup — the three numbers every seller needs before setting a price.
Where each dollar goes
The purple slice is your cost — the pink slice is your profit. It redraws from your inputs.
Keep exploring
Three companion tools for pricing and money math.
How it works
Three steps from cost to a confident price.
Enter your cost
Type what one unit costs you — wholesale price, materials, or full landed cost.
Set the selling price
Type the price your customer pays. Add units to scale to a batch.
Read margin and markup
See profit, margin (profit ÷ price), and markup (profit ÷ cost) side by side.
The math behind profit margin
Profit is the same everywhere — but margin and markup divide it by different bases:
Margin answers “how much of each sale is profit?” and can never exceed 100%. Markup answers “how much did I add to cost?” and can exceed 100% easily. The same sale always shows a higher markup than margin.
Worked examples:
| Inputs | Calculation | Result |
|---|---|---|
| Cost $60, price $100 | Profit $40; 40 ÷ 100; 40 ÷ 60 | Margin 40.00%, markup 66.67% |
| Cost $25, price $50, 100 units | Profit $25 × 100; 2,500 ÷ 5,000; 2,500 ÷ 2,500 | Profit $2,500; margin 50.00%, markup 100.00% |
| Cost $80, price $120 | Profit $40; 40 ÷ 120; 40 ÷ 80 | Margin 33.33%, markup 50.00% |
| Cost $90, price $60 (loss) | Profit −$30; −30 ÷ 60 | Margin −50.00% — selling below cost |
Solve from any two numbers
The calculator above starts from cost and price — but sometimes those are the two numbers you don’t have. Fill in any two of the five and this solver works out the other three.
Any two numbers
The full picture
Every pair tells the same story from a different starting point. Margin and price are the pair most sellers actually know — “I want a 40% margin and I’ll charge $100” — and the solver turns them into the most you can afford to pay: a $60 cost. Markup runs the same trick in reverse: an $80 cost at a 50% markup needs a $120 price. The one pair that can never start a calculation is margin + markup: the two percentages describe each other completely — a 40% margin is always a 66.67% markup, at any scale — so together they fix the shape of a deal but never a single dollar amount. One of your two numbers has to be money.
Go deeper
The details that separate a rough guess from a trustworthy number.
Both use the same profit on top — but different bases on the bottom:
- Margin divides by the selling price, which is always larger than cost when you profit.
- Markup divides by the cost, which is always smaller.
- Dividing by a smaller number gives a bigger percent — so markup > margin on every profitable sale.
- Example: cost $60, price $100 → margin 40%, markup 66.67%.
Mixing them up is the classic pricing mistake: a “40% markup” prices at $84, not $100 — that sale’s true margin is only 28.57%.
It depends on the business:
- Retail — gross margins of 25–50% are common; net margins are far lower.
- Restaurants — net margins of 3–9% are typical; volume does the work.
- Software — gross margins of 70–90% are normal; the product scales.
- Rule of thumb — track gross margin per product with this calculator, and net margin (after rent, wages, tax) across the business.
Compare your number against competitors in your own niche, not against a universal target.
Stock & currency margin
“Margin” means something different at a brokerage: the cash you put down so you can borrow the rest of a trade. Two quick tools for that sense of the word.
Stock trading margin
What you put in
Currency exchange margin
What you put in
For stocks bought on margin in the US, the floor is set by the Federal Reserve’s Regulation T: an initial margin of 50% of the purchase price. Once you hold the shares, FINRA Rule 4210 sets a maintenance minimum of 25% — keep at least that much equity in the account or face a margin call — and most brokers set higher “house” requirements on top. Currency margin has no single US rule; brokers set the ratio under their local regulator’s caps, which is why it is an input above, not a constant. (Regulation T and FINRA figures checked October 2026; brokers can always ask for more than the regulatory floor.)
Markup to margin, and back: the conversion table
Two names for the same profit, divided by two different bases. The table converts one to the other, and prices a $60-cost item at each step so the difference is in dollars, not just percent.
Margin equals profit divided by the selling price. Markup equals profit divided by the cost. To convert, divide by the other base: margin equals markup divided by (1 plus markup), and markup equals margin divided by (1 minus margin). A 50% markup is 50 divided by 150, which is a 33.33% margin. A 40% margin is 40 divided by 60, which is a 66.67% markup. The same sale, two honest numbers, and the markup is always the larger one while the sale is profitable.
| Markup on cost | Margin on price | Price of a $60-cost item | Profit per item |
|---|---|---|---|
| 10% | 9.09% | $66.00 | $6.00 |
| 20% | 16.67% | $72.00 | $12.00 |
| 25% | 20.00% | $75.00 | $15.00 |
| 30% | 23.08% | $78.00 | $18.00 |
| 40% | 28.57% | $84.00 | $24.00 |
| 50% | 33.33% | $90.00 | $30.00 |
| 66.67% | 40.00% | $100.00 | $40.00 |
| 100% | 50.00% | $120.00 | $60.00 |
| 150% | 60.00% | $150.00 | $90.00 |
| 200% | 66.67% | $180.00 | $120.00 |
Read the table from either side. Pricing at a 40% markup on a $60 cost gives $84, whose true margin is only 28.57%. Pricing for a 40% margin needs the 66.67% markup row, which gives $100. That single mix-up is the classic pricing mistake, and it is why the target-margin field on the calculator above solves the price backwards from the margin you actually want, instead of asking you to convert in your head. The any-two solver below does the same conversion from any pair you enter.
Gross margin is not net margin
The margin on this page is gross margin: it uses only the direct cost of what you sold. Net margin goes further and divides what is left after every cost by revenue. Take $10,000 of revenue with $6,000 of direct cost: gross profit is $4,000, so gross margin is 40%. After $2,500 of overhead and $300 of fees, $1,200 is left, so net margin is 12%. Both numbers are correct, and they answer different questions: gross margin judges the price of one product, net margin judges the whole business. This calculator reports gross margin on the cost and price you enter. To approximate a net figure, load every per-unit cost, including shipping and fees, into the cost field, or take the gross profit it reports and subtract your other costs by hand. The typical ranges by business type in the Go deeper notes are gross ranges unless they say net, which is one more reason to compare your number only with businesses like yours.
Margin versus markup: the conversion to memorise
Margin divides by price, markup divides by cost, and the two diverge fast. A 50 percent markup is a 33.3 percent margin, and a 40 percent margin needs a 66.7 percent markup. The companion guide carries the full conversion table and the discount arithmetic that follows from it.
The discount check before any promotion
A 20 percent discount on a $60 price with $40 cost halves the margin from 33.3 percent to 16.7 percent, because cost does not fall with price. Run the discounted margin, not just the discounted price, before approving a promotion.
Frequently asked questions
Quick answers about this margin calculator.
How do I calculate profit margin?
Profit margin = (selling price − cost) ÷ selling price × 100. If it costs $60 and sells for $100, the margin is (100 − 60) ÷ 100 = 40%. This calculator does it instantly.
How do I calculate markup?
Markup = (selling price − cost) ÷ cost × 100. If it costs $60 and sells for $100, the markup is 40 ÷ 60 = 66.67%. Markup is always higher than margin on the same sale.
What is the difference between margin and markup?
Margin divides profit by the selling price (“how much of each sale is mine?”); markup divides profit by the cost (“how much did I add to cost?”). Cost $60, price $100 → 40% margin, 66.67% markup.
How do I price a product for a 40% margin?
Price = cost ÷ (1 − margin). For a 40% margin on a $60 cost: $60 ÷ 0.60 = $100. Note that a 40% markup would price it at only $84 — the same words, very different price.
Can profit margin be negative?
Yes — when the selling price is below cost. Selling a $90-cost item for $60 gives a margin of (60 − 90) ÷ 60 = −50%. The calculator shows negative margins in red-free plain numbers so losses are obvious.
Does this include shipping, fees, or taxes?
No — the margin here is on the cost and price you enter. For a true picture, roll shipping, marketplace fees, and payment processing into the “cost per unit” field before calculating.
How do I convert markup to margin?
Divide the markup by one plus the markup: margin equals markup divided by (1 plus markup). A 50% markup is 50 divided by 150, which is 33.33% margin. The other way, markup equals margin divided by (1 minus margin): a 40% margin is 40 divided by 60, which is 66.67% markup. The conversion table above lists both directions for the common values, and the any-two solver on this page does the same conversion from any pair you enter.
What is the difference between gross margin and net margin?
Gross margin uses only the direct cost of what you sold: (revenue minus cost of goods sold) divided by revenue. Net margin uses everything left after all costs: revenue minus cost of goods sold, overhead, fees and taxes, divided by revenue. On $10,000 of revenue with $6,000 of direct cost, gross margin is 40%. After $2,500 of overhead and $300 of fees, $1,200 is left, so net margin is 12%. This calculator reports gross margin on the cost and price you enter. To approximate a net figure, load every per-unit cost, including fees and shipping, into the cost field, or take the gross profit it reports and subtract your other costs by hand.
Is margin always smaller than markup?
Yes, on any profitable product, because margin divides by the larger number, price, while markup divides by cost. The gap grows as margin rises: at 80 percent margin the markup is 400 percent.
What margin do I need to cover overheads?
Gross margin must exceed overheads as a share of revenue. If overheads run 25 percent of sales, a 30 percent gross margin leaves only 5 percent before interest and tax. Price for the net result, not just the gross.
Does the calculator handle discounts?
It solves from any two numbers among cost, price, margin, and markup. Enter the discounted price to see the discounted margin, which is the number a promotion should be judged by.
Related guides
Margin and markup, worked in full.
Gross Margin vs Profit Margin
Gross, net and operating margin, with the bridge between them.
🔁Markup vs Margin
The conversion table, the pricing mistake, and worked prices.
📖How to Calculate Profit Margin: Formula and Worked Examples
Margin divides by price, markup by cost: formulas, the conversion table, and the discount check.
Related calculators
More ways to price and count money.
Disclaimer
This calculator is for information only — not business, tax, or pricing advice. Margins shown are gross on the cost and price you enter and do not include shipping, fees, taxes, labor, or overhead. Actual profitability depends on your full cost structure — verify with your own accounts before setting prices. The stock and currency margin tools on this page are educational examples worked from the numbers you type in — not investment advice and not a quote from any broker.