What the margin calculator works out
Margin is the money left after the costs are taken off the selling price, and a margin rate says what share of some base amount that money is. From three numbers this page gives you three amounts and two rates, kept separate on purpose.
- Total cost — the purchase cost plus the other costs.
- Gross profit — the selling price with only the purchase cost removed.
- Profit — the selling price with the purchase cost and the other costs removed.
- Gross margin — what share of the selling price the gross profit is.
- Markup on cost — what share of the total cost the profit is.
People use the word “margin” for different numbers, so this page does not merge them. The two rates have different numerators and different denominators, and quoting one when you mean the other is the most common way a healthy-looking plan turns out to be a loss.
The result is an informational estimate based only on the values you enter. Nothing here works out a tax or a fee for you, and no price or margin is recommended.
How to use the margin calculator
- Enter what the buyer pays you in Selling price.
- Enter what the item cost you to buy or make in Purchase cost.
- Add up every other amount you already know — packaging, shipping you pay for, a fee you have already worked out — and enter the total in Other costs. Leave it at 0 if there is nothing to add.
- Select Calculate to see the three amounts, the two rates and the step-by-step details.
- Select Reset example to put the opening illustration back.
Keep the same basis in all three fields. If you are looking at one item, all three amounts must be per item; if you are looking at one order, all three must be for that order. A per-item selling price next to a month of shipping costs produces a number that means nothing.
The values shown when the page opens are a hypothetical example chosen to show how the calculation works. They are not a real price and not a recommended margin. This calculator holds no industry benchmark and no fee rate of its own.
Gross profit and profit are not the same thing
There is exactly one difference between them: whether the other costs have been taken off.
- Gross profit = selling price − purchase cost — what the item itself leaves you, before the other costs.
- Profit = selling price − purchase cost − other costs — the final amount, after packaging, shipping and anything else you entered.
So profit is always smaller than gross profit by exactly the other costs, and the two become equal when the other costs are 0.
Gross profit can be positive while profit is negative. The item itself made money, but the packaging and the shipping turned the sale into a loss. Showing both side by side is the whole point of keeping them apart.
Gross margin and markup on cost use different denominators
The two rates differ in both the numerator and the denominator. The names sound alike, so it is worth learning the two sentences below.
- Gross margin = gross profit ÷ selling price × 100 — the numerator has only the purchase cost removed and the denominator is the selling price. It answers “of every 100 I take in, how much is left?” Because the denominator is the selling price, it cannot exceed 100%.
- Markup on cost = profit ÷ (purchase cost + other costs) × 100 — the numerator is the final profit, with the other costs removed as well, and the denominator is the total cost, not the purchase cost alone. It answers “of every 100 I put in, how much came back?” and it can exceed 100%.
Gross margin is not a final, all-in profit rate. Its numerator does not include the other costs at all. If you want a rate that does, read markup on cost, or simply read the amount called profit.
Note the denominator of markup on cost carefully. It is the total cost, which is the purchase cost plus the other costs. A calculator that divides by the purchase cost alone reports a larger number for the same sale, which is another reason results differ between sites.
Formulas and symbols
These are the formulas this page uses. Follow them in order and you can check every value by hand.
- Total cost = C + E
- Gross profit = S − C
- Profit = S − C − E
- Gross margin (%) = (S − C) ÷ S × 100
- Markup on cost (%) = (S − C − E) ÷ (C + E) × 100
- S — selling price
- C — purchase cost
- E — other costs, entered by you
Intermediate values are not rounded. Only the numbers on screen are rounded, and a rate that is not 0 but would round to 0 is written as “less than 0.0001%” rather than a false 0%.
Worked example
These are the same values the calculator shows when the page opens. They are a hypothetical example, not a real price and not a recommended margin, and every step can be checked by hand.
- Selling price 100, purchase cost 60, other costs 10
- Total cost = 60 + 10 = 70
- Gross profit = 100 − 60 = 40
- Profit = 100 − 60 − 10 = 30
- Gross margin = 40 ÷ 100 × 100 = 40%
- Markup on cost = 30 ÷ 70 × 100 ≈ 42.8571%
Set the other costs to 0 in the same example and the total cost becomes 60, the profit becomes 40 — the same as the gross profit — and markup on cost becomes 40 ÷ 60 × 100 ≈ 66.6667%. Other costs of 10 cut the profit by 10 and moved both rates.
Notice that 40% and about 42.8571% are not the same number. They are the same sale measured against two different bases. Neither one is wrong; quoting one while meaning the other is.
Reading zeros, break-even and losses
- A profit of 0 is break-even. The selling price exactly equals the total cost and markup on cost is exactly 0%. Gross profit is usually still positive, because it holds the other costs.
- A negative profit is a loss, not an error. Losses are never hidden or turned into 0. The negative amount is shown as it is, with the word Loss next to it rather than colour alone, and the rates stay negative too. Markup on cost of −20% means a fifth of what you put in did not come back.
- If the selling price is 0, gross margin is shown as “Not available”. The rate divides by the selling price, so there is nothing to divide by. No 0% and no infinity is invented in its place; the amounts and markup on cost are still shown.
- If the purchase cost and the other costs are both 0, the total cost is 0 and markup on cost is shown as “Not available”. The amounts and gross margin are still shown.
- If all three amounts are 0, every amount is 0 and both rates are “Not available” together, because a rate measured against 0 has no meaning.
- Negative numbers, empty fields, letters and values above the limit are not calculated. The calculator tells you which field is wrong and why, and an empty field is never silently read as 0.
- Some combinations fail even when each field on its own is fine. If the selling price is close to 0 while the costs are very large, a rate becomes too big to represent; if one amount is far larger than another, the smaller one disappears completely in the addition or subtraction. Rather than show a truncated figure, the calculator refuses and points at the field to fix.
The upper limit on each amount is not a legal or regulatory figure. It is a safety limit chosen to catch typing mistakes and keep the arithmetic meaningful.
What goes into other costs
Any amount you already know can be added in. Common examples are:
- Packaging and materials
- Shipping, when you pay for it
- A payment or selling fee amount you have already worked out
- Anything else attached directly to that sale
This calculator never fills anything in for you. It does not guess a fee rate or a tax rate, so an amount is included only if you add it into this field yourself. Note also that the field takes an amount, not a percentage.
Fixed costs such as rent and wages do not attach to a single sale, so they do not fit here directly. To include them you would have to divide them yourself — “monthly fixed costs ÷ expected monthly units” — and the basis for that division is your decision, not the calculator’s.
Assumptions and limitations
- Results are informational estimates based only on the values you enter.
- Taxes such as VAT and income tax are not automatically included. No tax rate is guessed or held in the code, and whether your selling price includes tax is your decision.
- Card payment fees, marketplace and platform selling fees, and payout schedules are not automatically included. Those rules differ by platform and change over time, so they are never assumed.
- Fixed costs such as rent, wages and advertising are not spread across units for you.
- Returns, exchanges, stock losses, exchange rates and stock turnover are not included.
- If a cost is missing, your real profit is smaller than this result. The calculator cannot know about a cost you did not enter.
- This is a per item or per order calculation and does not total up a whole product range.
- Intermediate values are not rounded; only the numbers on screen are rounded for display.
- This is not accounting, tax or legal advice. No price and no margin is recommended and no profit is guaranteed. Your real filings and payouts may follow different rules.
- Your inputs are calculated only in this browser and are never sent to or stored on a server.
Frequently asked questions
How is margin calculated here?
Add the purchase cost and the other costs to get the total cost. Take only the purchase cost off the selling price and you have gross profit; take the other costs off as well and you have profit. Gross margin is gross profit divided by the selling price times 100, and markup on cost is profit divided by the total cost times 100. With a selling price of 100, a purchase cost of 60 and other costs of 10, that gives a total cost of 70, gross profit of 40, profit of 30, gross margin of 40% and markup on cost of about 42.8571%.
What is the difference between gross profit and profit?
Whether the other costs have been taken off. Gross profit removes only the purchase cost, so packaging and shipping are not in it yet, while profit is the final amount with those other costs removed as well. Profit is therefore always smaller than gross profit by exactly the other costs, and the two are equal when the other costs are 0. Gross profit can be positive while profit is negative, which is why both are shown side by side.
What is the difference between gross margin and markup on cost?
Both the numerator and the denominator differ. Gross margin divides gross profit, which has only the purchase cost removed, by the selling price, so it answers how much of what you took in is left and cannot exceed 100%. Markup on cost divides the final profit, with the other costs removed too, by the total cost, meaning the purchase cost plus the other costs, so it answers how much of what you put in came back and can exceed 100%. Do not read gross margin as an all-in profit rate.
Is the denominator of markup on cost the purchase cost only?
No. It is the total cost, which is the purchase cost plus the other costs. That is why adding packaging or shipping into other costs lowers markup on cost twice over: it reduces the profit on top and raises the total cost underneath. A calculator that divides by the purchase cost alone reports a larger number for the same sale.
What goes into other costs?
Packaging, materials, shipping you pay for, and any payment or selling fee amount you have already worked out. It takes an amount, not a percentage. The calculator never fills anything in for you, so a cost you do not enter is not in the result. Leave it at 0 if there is nothing to add.
Can I include rent or wages?
Not directly, because they do not attach to a single sale. To include them you would divide them yourself, for example monthly fixed costs divided by expected monthly units, and enter that amount in other costs. The calculator does not do that division and the basis you choose is an assumption of yours, so the result stays an estimate.
Why is a rate not shown when the selling price or the total cost is 0?
A rate is a division, and a division needs something to divide by. A selling price of 0 removes the denominator of gross margin, and a purchase cost and other costs that are both 0 remove the denominator of markup on cost. Inventing 0% or infinity there would be false information, so the state is shown in words as Not available with the reason next to it, while the amounts and the other rate are still shown.
My result is negative. What does that mean?
The selling price was smaller than the costs, so the sale lost money. A negative profit is a loss and the rates go negative with it: markup on cost of −20% means a fifth of what you put in did not come back. The calculator never hides a loss or rewrites it as 0; the negative amount is shown as it is with the word Loss next to it, not colour alone. A profit of exactly 0 is break-even.
Are taxes and platform selling fees applied automatically?
No. This calculator holds no VAT rate, no card payment fee rate and no marketplace selling fee rate, and it never guesses one. If you want an amount included, work it out yourself and add it into other costs. Whether your selling price already includes tax is also your decision.
Will I really make the profit shown?
That cannot be promised. The result is an informational estimate from the values you entered, and the calculator cannot know about a cost you left out. If taxes, payment or selling fees, fixed costs such as rent and wages, returns or stock losses are missing, your real profit is smaller than this result. This is not accounting, tax or legal advice and no price or margin is recommended.
Are my inputs stored?
No. The calculation runs entirely in your browser, and your inputs are never sent to or stored on a server.
Related calculators
Markup on coston this page answers “of every 100 I put in, how much came back?” To ask that about an investment rather than a sale, the ROI Calculator takes an investment cost and an amount recovered. Both are simple ratios that do not take time into account, and neither applies any tax rate or fee rate for you.
If the money was tied up for a period and you want that reflected, the Investment Return Calculator adds a time period and a simplified annualised view on top of the same idea. It is still an informational estimate that guarantees no return.