Margin calculator
Check your selling price with the margin calculator, then compare markup, discounts and fees.
- How do I use the margin calculator?
- What is the margin calculator formula?
- What belongs in the cost field?
- How do I calculate a negative profit margin?
- Can I calculate margin with zero cost or sales?
- How do I calculate selling price from margin?
- How does a discount affect profit margin?
- How do selling fees affect profit?
- How do I calculate a target margin including fees?
- How do I calculate profit margin for multiple sales?
- Does changing currency or decimals change the result?
- How can I check my margin calculation?
- Guides
- Common questions
How do I use the margin calculator?
Before quoting a price, I use the margin calculator to check cost, selling price and profit. I start with the two amounts or rates that are known, such as unit cost and selling price. Select that pair explicitly; the other results are outputs, not additional assumptions. For a product costing 80 and selling for 100, the gross profit is 20, the margin is 20% and the markup is 25%. All amounts in an example use the same hypothetical currency. This page provides general information and arithmetic, not accounting, tax or financial advice.
What is the margin calculator formula?
Gross margin compares price minus cost with selling price: (100 − 80) ÷ 100 × 100 = 20%. Markup compares the same difference with cost: (100 − 80) ÷ 80 × 100 = 25%. I keep both percentages beside the profit amount because substituting one for the other changes a quote. A 50% markup on 80 gives 120, where profit 40 divided by price 120 gives a 33.33% margin. A 50% margin requires price 160, because profit 80 is half of sales 160.
What belongs in the cost field?
Decide what the unit cost includes before interpreting the result. Purchase price, manufacturing inputs and allocated direct costs are possible components, but they must describe the same unit and period as the selling price. BDC defines gross-profit margin using net sales and cost of goods sold. Discounts, returns and allowances affect the sales base. The separate fee section here is an optional product contribution model; it is not a complete income statement. Do not count a shipping expense twice by including it in both cost and the shipping field.
How do I calculate a negative profit margin?
If cost is 120 and selling price is 100, profit = 100 − 120 = − 20. Margin = − 20 ÷ 100 × 100 = − 20%; markup = − 20 ÷ 120 × 100 = − 16.67%. The calculator keeps the loss and draws negative contribution to the left of zero. I avoid a universal “good” or “low” badge: one product percentage cannot judge an entire business. Industry, cost classification, sales volume, overhead and working capital affect the interpretation. Compare equivalent measures rather than treating a color as a recommendation.
Can I calculate margin with zero cost or sales?
A zero-cost product sold for 100 has profit 100 and margin 100%, but markup is undefined because its cost denominator is zero. A product costing 80 with zero sales has profit − 80 and markup − 100%, but its margin is undefined. If both amounts are zero, both percentage ratios are undefined. The tool displays that word rather than inventing a zero percentage. Reverse pairs also need a unique solution: zero cost and a selected 20% margin cannot establish a valid positive selling price, while price 100 and margin 100% uniquely imply cost zero. A known zero selling price with a supplied markup is also rejected: positive cost gives only −100% markup, while zero cost makes markup undefined.
How do I calculate selling price from margin?
For a target gross margin m, price = cost ÷ (1 − m/100). With cost 80 and target 20%, price = 80 ÷ 0.80 = 100. Adding 20% to cost instead gives 96: profit 16 divided by price 96 produces only 16.67% margin. The preset buttons select the cost-and-margin pair and retain the current calculated cost. They are examples of targets, not recommended industry benchmarks. The reverse calculation rejects margin 100% with positive cost because the denominator becomes zero, rather than pretending that an infinite price is usable.
How does a discount affect profit margin?
A discount changes sales without changing the entered unit cost. Starting at price 100 and cost 80, a 10% discount gives price 100 × 0.90 = 90, gross profit 10 and margin 10 ÷ 90 × 100 = 11.11%. It does not give a 10% margin. At a 20% discount, price equals cost and gross profit becomes zero before any additional selling costs. The scenario table includes zero, ten, twenty and thirty percent plus your chosen discount. A full 100% discount is allowed, but margin becomes undefined when the price reaches zero. The large result is the gross margin before the discount. The price strip uses the price after your discount and subtracts the entered fees; read its contribution separately from gross profit.
How do selling fees affect profit?
The fee model applies a percentage fee to the actual discounted selling price, then adds a fixed per-unit fee and entered shipping or packing cost. At price 90, a 5% fee is 4.50. Add fixed fee 2 and fulfilment 3: contribution = 90 − 80 − 4.50 − 2 − 3 = 0.50. Contribution margin is 0.50 ÷ 90 × 100 = 0.56% after rounding. The chart separates unit cost, selling fees, fulfilment and contribution on one signed scale. Taxes, advertising, returns and overhead are excluded unless deliberately captured in the appropriate entered costs.
How do I calculate a target margin including fees?
A target contribution margin must allow for the percentage fee inside the selling-price equation. With cost 80, fixed fee 2, shipping 3, percentage fee 5% and target 20%, price = (80 + 2 + 3) ÷ (1 − 0.05 − 0.20) = 85 ÷ 0.75 = 113.3333… . The displayed price is 113.34 at two decimals; internal calculations retain more precision. The target card gives the transaction price needed, before any additional list-price discount. Break-even price for the same entered costs is 85 ÷ 0.95 = 89.4737… . A target plus fee of 100% or more has no positive finite solution under this model. The explanation below the target also calculates the list price for your chosen discount and rounds that list price upward to the selected decimal places. Target transaction prices, list prices and break-even prices are rounded upward to the selected decimal places; other results use ordinary display rounding. The report keeps the unrounded calculated amounts.
How do I calculate profit margin for multiple sales?
Save a comparison when the chosen discounted transaction and quantity are ready. Quantities multiply the monetary values, not the percentages. A sale of 100 with profit 20 and a sale of 10 with profit 5 have total profit 25 and total sales 110, so combined margin = 25 ÷ 110 × 100 = 22.73%. The average of 20% and 50%, which is 35%, would be wrong because the sales amounts differ. Saved rows are grouped by currency, and the tool never adds dollars to euros. Up to twelve comparisons can be kept and downloaded as CSV.
Does changing currency or decimals change the result?
The currency selector changes the displayed code; it does not convert amounts or retrieve exchange rates. Choose a single currency for each comparison and enter prices on a consistent tax basis. A tax collected solely for a tax authority is not automatically revenue available as profit. Decimal places from zero through four change display precision only. Enter an ungrouped decimal with either a dot or comma, such as 80.25 or 80,25; a mixed separator or scientific notation is rejected. If you need a price rounded upward to a market increment, check the resulting margin again after entering that actual price.
How can I check my margin calculation?
I verify the percentage base, the included costs and a few control values before using a result. Inputs and calculations stay in the browser; no financial values are uploaded by the tool. Comparisons stay in the tab unless you explicitly enable device storage. Copy, print and CSV create separate records, and clearing inputs cannot remove those records. Clearing comparisons removes the tool’s saved comparison list. A locally remembered list may be visible to other people using the same browser profile. Keep that distinction in mind when naming a row or copying a quote.
| Inputs | Working | Expected result |
|---|---|---|
| Cost 80, price 100 | Profit 20 | Margin 20%; markup 25% |
| Cost 80, target margin 20% | 80 ÷ 0.8 = 100 | Selling price 100 |
| Cost 80, markup 50% | 80 × 1.5 = 120 | Margin 33.33% |
| Cost 120, price 100 | Profit − 20 | Margin − 20%; markup − 16.67% |
| Cost 0, price 100 | Profit 100 | Margin 100%; markup undefined |
| Cost 80, price 0 | Profit − 80 | Margin undefined; markup − 100% |
| Cost 80, price 100, discount 10% | Discounted price 90 | Gross margin 11.11% |
| Cost 80, price 90, fee 5%, fixed 2, shipping 3 | 90 − 80 − 4.5 − 2 − 3 = 0.5 | Contribution margin 0.56% |
Definitions: BDC gross-profit margin and BDC net-profit margin. Read margin versus markup and discounts, fees and contribution. · target margins and rounded prices. · French percentage terminology (Bpifrance).
Guides
Common questions
Is a 25% markup the same as a 25% margin?
No. On cost 80, 25% markup gives price 100 and margin 20%. A 25% margin needs price 106.6667… .
Can margin be negative?
Yes. Costs above sales give a loss and a negative margin when sales are positive.
Why is a percentage undefined?
The denominator is zero. Zero sales makes margin undefined; zero cost makes markup undefined.
Is contribution company net profit?
No. It deducts only the costs, fees and fulfilment you entered; overhead, interest and tax are not automatically included.
Does the currency selector convert money?
No. It changes the displayed currency code only.
Are comparisons stored automatically?
No. Saving is explicit, and device storage requires the checkbox. Without it, comparisons stay only in this tab.
Updated