Profit margin is the percentage of the selling price that is left as profit after you subtract the cost. This guide shows how to calculate profit margin with the formula, a full example to copy for an invented candle shop in Charleston, the difference between margin and markup, and how to work out a price from the margin you want. The demo calculator was built in wanno, a platform that builds websites and apps with AI from your phone, in 35 seconds and cost $0.34.
In short: profit margin is (selling price - cost) ÷ selling price × 100, and the parentheses are required. A product that costs $4 and sells for $10 has a 60% margin. Markup is a different calculation: it divides the profit by the cost and gives 150% on the same product. To set a price from the margin you want, use price = cost ÷ (1 - margin).
Updated December 1, 2026.
At a glance: the four calculations in this guide
| Calculation | Formula |
|---|---|
| Profit per unit | selling price - cost |
| Profit margin | (selling price - cost) ÷ selling price × 100 |
| Markup on cost | (selling price - cost) ÷ cost × 100 |
| Price from the margin you want | cost ÷ (1 - margin) |
01. What is profit margin and what is it for?
Profit margin tells you how much of every dollar you charge is left as profit once you have paid for the product. It is measured on the selling price, not on the cost. When only the cost of the product is subtracted it is usually called gross profit margin, and section 06 covers the net version.
It helps with three decisions in a small business: comparing products (the soy jar candle in the example earns $12 and the gift set $20, but the jar candle keeps 50% of its price and the gift set 40%), spotting the products that barely earn anything, and setting prices with a target, so the price comes from a calculation and not from a hunch.
This guide measures the margin. To build the full cost (with your own labor and fixed expenses) and the price for each sales channel, see the guide on how to price a product.
02. Profit margin by product: an example to copy
A profit margin sheet by product lists each product with its cost (purchase plus packaging), selling price, gross profit, margin and markup, plus a summary with the average. This example is for Lowcountry Candle Co., an invented candle shop in Charleston, South Carolina. The amounts are in US dollars and are only an example: swap in your own currency and keep the same columns. It was prepared by Claire Whitaker (an invented person) in November 2026.
| Product | Cost | Selling price | Gross profit | Margin | Markup |
|---|---|---|---|---|---|
| Votive candle | $4.00 | $10.00 | $6.00 | 60.0% | 150.0% |
| Travel tin | $6.00 | $15.00 | $9.00 | 60.0% | 150.0% |
| Soy jar candle, 8 oz | $12.00 | $24.00 | $12.00 | 50.0% | 100.0% |
| Gift set | $30.00 | $50.00 | $20.00 | 40.0% | 66.7% |
| Wax melts box | $8.00 | $10.00 | $2.00 | 20.0% | 25.0% |
| Sample pack | $9.00 | $10.00 | $1.00 | 10.0% | 11.1% |
And this is the summary:
| Summary | Value |
|---|---|
| Gross profit on one unit of each product | $50.00 |
| Products under a 30% margin | 2 |
| Average margin | 40.0% |

The math: the votive candle earns 10 minus 4, or $6; 6 ÷ 10 gives a 60% margin and 6 ÷ 4 gives a 150% markup. By the same method the sample pack earns $1: 1 ÷ 10 is 10% and 1 ÷ 9 is 11.1%. The gross profit on one unit of each product adds up to 6 + 9 + 12 + 20 + 2 + 1 = $50, and the average margin is (60 + 60 + 50 + 40 + 20 + 10) ÷ 6 = 240 ÷ 6 = 40%.
This average is simple: it does not weight products by sales. For that, use a daily sales report.
03. How to calculate profit margin step by step
To calculate profit margin, subtract the cost from the selling price to get the profit, divide that profit by the selling price and multiply by 100. The result is the percentage of the price you keep as profit. These are the steps, using the votive candle from the example:
- Add up the cost of one unit: what you paid for the product plus packaging. For the candle: $4.
- Take the selling price without the sales tax you collect on behalf of the government (check with your accountant). For the candle: $10.
- Calculate the profit: selling price minus cost. 10 - 4 = $6.
- Divide the profit by the selling price: 6 ÷ 10 = 0.60.
- Multiply by 100: 0.60 × 100 = 60%.
Profit margin formula
The profit margin formula is: margin % = (selling price - cost) ÷ selling price × 100. Without parentheses, a spreadsheet or a scientific calculator does the division first and the subtraction after: 10 - 4 ÷ 10 gives 9.6, because it solves 4 ÷ 10 = 0.4 and then 10 - 0.4. With parentheses, (10 - 4) ÷ 10 gives 0.6, the correct 60%.
In a spreadsheet, with the cost in B2 and the selling price in C2, the formula is =(C2-B2)/C2, with the cell formatted as a percentage.
The small business tax guide of the U.S. Internal Revenue Service (IRS Publication 334) figures gross profit by subtracting the cost of goods sold from net receipts, and then says to divide gross profit by net receipts: the resulting percentage measures the average spread between the merchandise cost of goods sold and the selling price (IRS Publication 334). It is the same calculation as the steps above, applied to a whole business.
Bpifrance Création, the French support body for business founders, uses the name taux de marque for this calculation (selling price minus purchase cost, both before tax, divided by the selling price before tax) and warns that it must not be confused with the taux de marge, which divides by the cost (its definition). The same mix-up exists in English between margin and markup.
04. Margin vs markup: what is the difference
Profit margin divides the profit by the selling price; markup divides the same profit by the cost. They are two different percentages for the same product, and markup is always the larger one. Mixing them up makes you believe you earn more than you do.
A typical case: your cost is $100, you add 30% and sell at $130, and you think you have a 30% margin. But the profit is $30 on a price of $130: the margin is 30 ÷ 130 = 23.1%. For a 30% margin on that cost, the price has to be $142.86 (100 ÷ 0.70).
This table shows which markup matches each margin. The calculation is markup = margin ÷ (1 - margin); the other way around, margin = markup ÷ (1 + markup):
| Margin on the price | Calculation | Markup on the cost |
|---|---|---|
| 10% | 0.10 ÷ 0.90 | 11.1% |
| 20% | 0.20 ÷ 0.80 | 25% |
| 25% | 0.25 ÷ 0.75 | 33.3% |
| 30% | 0.30 ÷ 0.70 | 42.9% |
| 40% | 0.40 ÷ 0.60 | 66.7% |
| 50% | 0.50 ÷ 0.50 | 100% |
| 60% | 0.60 ÷ 0.40 | 150% |
It reads both ways: a 25% markup equals a 20% margin, and selling at double the cost (a 100% markup) is a 50% margin. A margin never reaches 100%; a markup can go past it.
05. How to calculate a price from the margin you want
To get the selling price from a target margin, divide the cost by one minus the margin written as a decimal: price = cost ÷ (1 - margin). The sample pack in the example costs $9 and sells for $10, a 10% margin: to reach 30% it would have to sell for $12.86 (9 ÷ 0.70) or cost $7. Rounded up to $13, the real margin is 4 ÷ 13 = 30.8%.
To find out how many units you need to sell to cover your fixed costs at that margin, continue with the break-even calculator.
06. Gross and net profit margin
Gross profit margin subtracts only the cost of what you sell; net profit margin also subtracts all the other expenses of the business and taxes. The first is for comparing products, the second tells you how much the business really keeps.
Net margin starts from gross profit and subtracts the other expenses, interest and taxes: net profit ÷ sales × 100, using the data for the whole period. Which expenses and taxes count changes from one country to another: take the net margin from your financial statements and ask your accountant. The U.S. Small Business Administration (SBA) also defines contribution margin as (sale price per unit - variable cost per unit) ÷ sale price per unit, which leaves fixed costs out (SBA).
An invented example, with one month of Lowcountry Candle Co.: it sells $10,000.00 and what it sold cost $5,000.00, so gross profit is $5,000.00 and the gross margin is 50%. After $3,800.00 of rent, wages, utilities and advertising, operating profit (before interest and taxes) is $1,200.00 and the operating margin is 12%. With $300.00 of interest and taxes (an example amount, not a rate), net profit is $900.00 and the net margin is 9%.
07. What is a good profit margin?
There is no good margin for everyone: it depends on the industry, on fixed costs and on sales volume. Compare your products with each other and month to month, and set a threshold of your own (Lowcountry Candle Co. flags anything under 30%, an example value). Above all, watch for the margin that slips quietly because a supplier raised its cost. A high margin is not healthy on its own: a product with a 60% margin that sells a few units a month can bring in less profit than one with a 25% margin that sells every day, so read the margin together with how many units of each product you sell.
Put it into practice: a profit margin calculator in wanno
This is the exact prompt used in wanno for Lowcountry Candle Co.:
I want a profit margin calculator for my candle shop in Charleston, South Carolina, Lowcountry Candle Co. On one screen I enter each product with its name, its cost (purchase plus packaging) and its selling price, and the app calculates the gross profit per unit, the profit margin on the selling price and the markup on cost, showing the formula used under each result. It also works in reverse: I enter the cost and the margin I want and it gives me the selling price. There is a product list sorted from highest to lowest margin, with products under a 30% margin highlighted in a different color, and the store's average margin. Amounts are in US dollars, formatted like $1,250.00. Load 10 sample products with generic names and round numbers, and save everything in the cloud. While data is missing, show a neutral text, never a zero or negative result. Do not use real brands. The calculator opens without signing in and only the saved product list asks for a password, with a "See an example" button that opens it without a password. On a phone the tables show as cards, with no horizontal scrolling. Do not use long dashes. Everything visible in the app must be in English, with US spelling.
wanno built it on its own and with no adjustments: 35 seconds, 22 steps and $0.34 in total.
Try the calculator: lowcountry-candle-margin.wanno.dev, with sample data.

The image shows the calculator with the votive candle loaded: product name, cost per unit and selling price, and below them three results, each with its formula: gross profit $6.00, margin 60.00% and markup 150.00%. Above the fields are two tabs, "From cost and price" and "From cost and margin", the second one for working backward from the margin you want.

The image shows part of the example list, opened with the "See an example" button: cards with cost, price, profit, margin and markup, from the Amber Glass Tumbler Candle (64.29%) down to the Gift Set of Three Minis (25.00%). The Unscented Votive Pack of Four and the Gift Set of Three Minis, both at 25.00%, are highlighted with an "Under 30%" tag. Across the 10 products in the demo (different from the ones in the table), the average margin is 57.48%. The list of saved products turns on when you choose your password; it is a good idea to test saving with your own products before relying on it.
One limit: it is an internal control calculator, not an accounting or point-of-sale system, and it does not issue invoices or receipts. The shop, the products and the amounts are examples.
The cost: $0.34 is paid once and fits within two days of free credit ($0.30 a day, $1.50 monthly cap). For comparison, the wanno Starter plan costs $4.99 a month with $10 in credits included, about $0.17 a day, every day (see plans).
Create your profit margin calculator in wanno
Describe your products, your currency and the margin you are aiming for in wanno, and have a profit margin calculator ready on your phone.
Frequently asked questions
What is profit margin? It is the percentage of the selling price that is left as profit after you subtract the cost. It is calculated as (selling price - cost) ÷ selling price × 100. For a product that costs $4 and sells for $10, the margin is 60%.
How do you calculate profit margin? Subtract the cost from the selling price, divide the result by the selling price and multiply by 100. Use parentheses around the subtraction: (10 - 4) ÷ 10 × 100 = 60%.
What is the difference between margin and markup? Margin divides the profit by the selling price and markup divides it by the cost. A product with a cost of $4 and a price of $10 has a 60% margin and a 150% markup. Adding 30% to the cost does not give a 30% margin but a 23.1% one.
How do you calculate net profit margin? Divide the net profit for the period by the sales for the same period and multiply by 100. Net profit is what is left after subtracting the cost of what you sold, the other expenses of the business and taxes. In the example in section 06 it comes to 9%. Take it from your financial statements and confirm with your accountant which expenses count.
What is a good profit margin? It depends on the industry and on your fixed costs, and no single figure fits everyone. Compare your products with each other and month to month, and set a threshold of your own.
Can I build a profit margin calculator for free?
Yes. The wanno free plan gives a daily credit of $0.30 with a monthly cap of $1.50, and the calculator in this guide cost $0.34, which fits within two days of free credit. On the free plan the page lives on a wanno.dev subdomain and carries the "Built with wanno" badge. You pay to remove the badge, use your own domain or ask for more changes than the credit covers.
Read next: Cash flow template: how to build one, step by step



