If you sell anything — products, services, freelance work — you need to know two numbers cold: your profit margin and your markup. They sound interchangeable, they are not, and confusing them is one of the most common ways small businesses underprice themselves. This calculator handles both directions of the problem. Enter a cost and a selling price to see your profit, margin, and markup, or enter a cost and a target margin to get the price you should actually charge.
The tool runs entirely in your browser: nothing you enter is transmitted anywhere, it is free, there is no signup, and it works on your phone at the supplier's warehouse just as well as on your desk. Results update live as you type, so you can test dozens of pricing scenarios in a minute.
Mode 1, Calculate margin, answers "where do I stand?" Mode 2, Price from margin, answers "what should I charge?" Both take a cost as the starting point, because every pricing decision starts with knowing what the item costs you, including shipping, packaging, and fees if you want the answer to be honest.
What Is Profit Margin?
Profit margin is the share of your selling price that is profit. If you sell an item for 80 and it cost you 50, your profit is 30, and your margin is 30 / 80 = 37.5%. Every dollar of revenue splits into a cost part and a profit part, and margin tells you the size of the profit slice relative to the whole dollar.
Margin is the number most business owners, investors, and accountants care about, because it is measured against revenue. When someone says "we run a 20% margin business," they mean that for every 100 of revenue, 20 survives as profit after direct costs. Gross margin specifically means revenue minus cost of goods sold, before overhead like rent and salaries; net margin is what remains after everything. This calculator computes the gross figure.
A healthy margin depends entirely on the industry. Grocery stores often run 1–3% net margins and survive on volume. Software companies can exceed 70% gross margin. Comparing your number to businesses with a different cost structure is meaningless, but tracking your own margin over time is one of the most useful health checks there is.
What Is Markup — and Why It Is Not Margin
Markup is the profit measured against cost, not against price. In the same example — cost 50, price 80, profit 30 — the markup is 30 / 50 = 60%. Same profit, different denominator, very different number.
Here is the trap. A retailer thinks "I want a 25% profit" and marks up costs by 25%. Cost 100, price 125, profit 25 — but 25 / 125 is only a 20% margin. To actually achieve a 25% margin, the price must be 100 / (1 − 0.25) = 133.33. That 8.33 difference per unit is real money when multiplied by volume, and it compounds: the higher the margin target, the bigger the gap. A 50% markup produces only a 33.3% margin; a 100% markup produces a 50% margin.
The table shows the relationship for a cost of 100:
| Markup applied | Selling price | Profit | Margin |
|---|---|---|---|
| 20% | 120.00 | 20.00 | 16.67% |
| 33.3% | 133.30 | 33.30 | 25.0% |
| 50% | 150.00 | 50.00 | 33.33% |
| 100% | 200.00 | 100.00 | 50.0% |
| 150% | 250.00 | 150.00 | 60.0% |
Rule of thumb: markup is always larger than margin for the same deal, and they only converge toward each other at very low profit levels. If a supplier tells you something is "marked up 40%," your margin on resale depends on your own cost structure, not theirs.
How to Use This Calculator (Step by Step)
Mode 1: Calculate margin from cost and price
- Select Calculate margin.
- Enter your cost per unit. Example: 40.
- Enter your selling price. Example: 65.
- Read the results: profit 25.00, margin 38.46%, markup 62.5%.
Mode 2: Price from cost and target margin
- Select Price from margin.
- Enter your cost per unit. Example: 40.
- Enter your target margin as a percentage. Example: 40.
- Read the results: required selling price 66.67 and profit 26.67. That is what you must charge to truly keep 40% of every sale.
Try your current prices in mode 1 first. Once you see your real margins, switch to mode 2 and find the price that hits your target. If that price looks unsellable, the conclusion is not "skip the math" — it is that your cost needs to come down or your target needs to move.
How It Works: The Formulas
Mode 1 uses three straightforward formulas:
profit = selling price − costmargin % = (price − cost) / price × 100markup % = (price − cost) / cost × 100
Worked example: cost 120, price 150. Profit is 30. Margin is 30 / 150 × 100 = 20%. Markup is 30 / 120 × 100 = 25%. Notice again: 20% margin equals 25% markup.
Mode 2 reverses the margin formula. Since margin = (price − cost) / price, rearranging gives:
price = cost / (1 − margin / 100)profit = price − cost
Worked example: cost 120, target margin 25%. Price is 120 / 0.75 = 160.00, and profit is 40.00. Check: 40 / 160 = 25%. The formula breaks down if you enter a margin of 100% or more — you cannot keep 100% of a price while covering a nonzero cost — so the tool flags anything at or above 100 as impossible.
Common Use Cases
- E-commerce sellers. Your true cost includes product, inbound shipping, packaging, and marketplace fees. A product bought for 18 and sold for 45 after 9.50 in total fees has profit 17.50 and a real margin of 38.9% — not the 60% you might have assumed from the buy/sell spread.
- Contractors and freelancers. If you want a 50% margin on work that costs you 600 in labor and materials, the quote is 600 / 0.5 = 1,200. Charging 900 gives you 33.3%.
- Retail buyers. When a vendor quotes a cost of 35 and your store policy is a 45% margin, the required retail price is 35 / 0.55 = 63.64.
- Menu pricing. Restaurants often target 25–35% food cost as a percentage of menu price. A dish with 6.50 in ingredients at a 30% food cost (70% margin) should be priced near 21.67.
- Checking whether a sale is worth it. A 20% discount on a 38.33%-margin product (cost 37.50, price 60.75) drops the price to 48.60 and the margin to 22.8% — a much bigger proportional hit than the discount suggests.
Tips and Best Practices
- Use fully loaded costs. Include freight, duties, payment processing, and packaging in the cost input. A margin computed on bare product cost flatters you and hides thin reality.
- Separate gross from net thinking. Gross margin of 40% with 35% overhead means 5% net. The calculator gives you the gross number; subtract overhead mentally before celebrating.
- Set margin targets by role of the product. Many retailers run lower margins on traffic-driving staples and higher margins on accessories. Do not force one target across the catalog.
- Recalculate when costs move. If your cost rises 10%, the price needed to hold the same margin rises by the same 10% — margins are ratio-preserving under proportional cost changes, but only if you actually reprice.
- Convert when talking to suppliers. Supplier conversations use markup; financial statements use margin. Keep the two vocabularies straight and translate deliberately.
Limitations Worth Knowing
This tool computes single-product, gross-level figures. It does not allocate fixed overhead, marketing spend, or returns across products, so a 30% gross margin product is not necessarily profitable once you account for rent and ads. It also ignores volume effects: pricing to a 60% margin might cut unit volume enough to lower total profit, which is a strategy question no ratio calculator can answer. Use it for per-unit economics and pricing floors, then layer demand, competition, and overhead analysis on top.
Margin Calculator vs. Doing It by Hand
The math itself is four formulas, and you can absolutely do it by hand — but the failure mode is not arithmetic, it is using margin arithmetic where markup arithmetic belongs, or vice versa. This tool shows both numbers side by side in mode 1, so the mismatch is visible every time, and mode 2 removes the division entirely when you are pricing forward. It is free, instant, works on any device, and because all computation stays local in your browser, you can paste real cost and price data into it without those numbers ever leaving your device.