Free tool Profit margin calculator: gross margin, net margin and markup
Fill in any two of cost, selling price, gross profit and margin, and the calculator solves the other two. Add marketplace fees, shipping, other costs and tax to see how much of the gross margin is left as net margin.
- Any two values solve the rest
- Margin and markup together
- Runs locally
Solve margin, price or cost
Use per-unit numbers or totals for a period, but keep every field on the same basis. Leave the two values you want to find empty. The last four fields are optional.
What the item cost you to buy or make, per unit or in total.
Price per unit, or net sales for the period, excluding VAT or sales tax.
Revenue − cost. Leave empty to calculate it. Can be negative.
Gross profit ÷ revenue. Fill it in with cost or price to find the other.
Optional. Commission plus card or wallet fees, as a share of the price.
Optional. Postage, packaging and pick-and-pack, on the same basis as cost.
Optional. Ads, staff, software or rent allocated to the same unit or period.
Optional. Applied only when profit before tax is positive.
Gross margin
40.0%
(Revenue − cost) ÷ revenue.
Markup
66.7%
(Price − cost) ÷ cost. Same profit, measured against cost.
Share these inputs: the values go after the # in the link, so they never reach a server.
https://tapcub.com/tools/profit-margin-calculator
Version v1.0Updated Update history
Four numbers, four different questions
They all come from the same price and cost, but each one answers something else.
Gross margin
The share of each sale left after the cost of the goods. 40% means $40 of every $100 in revenue is available to pay for everything else — fees, shipping, ads, staff — and profit.
Markup
The same profit compared with cost instead of price. A 66.7% markup and a 40% margin describe the same $30 item sold at $50. Markup is always the larger number when there is a profit.
Net profit
What is left after the optional costs you entered. In the example, $20 of gross profit shrinks to $10 after $1.50 of fees, $5 of shipping and $3.50 of other costs.
Net margin
Net profit ÷ revenue. It shows how much of the gross margin survives the cost of actually selling. Compare it over time on the same basis, not with another company's figure built differently.
Gross margin is a pricing number; net margin is a business number. A product can have a healthy gross margin and still lose money once marketplace fees, free shipping and paid acquisition are counted.
Three common questions
Leave the two values you want to find empty and fill the other two.
-
1
What is my margin?
Enter cost and price. The calculator shows gross profit, gross margin and the equivalent markup.
-
2
What should I charge?
Enter cost and the margin you want, and leave price empty. Price = cost ÷ (1 − margin): a $30 item at a 40% margin sells for $50.
-
3
What is left after selling costs?
Add marketplace and payment fees, shipping and other costs per unit to see net profit and net margin.
Profit margin formulas, step by step
Gross margin divides by revenue; markup divides by cost. Everything else follows from these two definitions.
- Revenue is net sales: after discounts and refunds, without VAT or sales tax
- Cost of goods includes the purchase price and inbound freight; selling costs come after gross profit
- Price for a target margin is cost ÷ (1 − margin), not cost × (1 + margin)
- Gross margin can never reach 100% while the item costs anything; markup has no upper limit
Gross profit
revenue − cost of goods
$50 − $30 = $20
Gross margin
gross profit ÷ revenue × 100%
$20 ÷ $50 = 40.0%
Markup
gross profit ÷ cost × 100%
$20 ÷ $30 = 66.7%
Net profit
gross profit − fees − shipping − other costs − tax
$20 − $1.50 − $5 − $3.50 = $10
Net margin
net profit ÷ revenue × 100%
$10 ÷ $50 = 20.0%
Price for a target margin
cost ÷ (1 − margin)
$30 ÷ (1 − 0.40) = $50
One $30 item at six prices
Same cost, different prices. Margin and markup move together but never match, and the gap grows as the price rises.
| Price | Gross profit | Gross margin | Markup |
|---|---|---|---|
| $33.00 | $3.00 | 9.1% | 10.0% |
| $37.50 | $7.50 | 20.0% | 25.0% |
| $40.00 | $10.00 | 25.0% | 33.3% |
| $50.00 | $20.00 | 40.0% | 66.7% |
| $60.00 | $30.00 | 50.0% | 100.0% |
| $75.00 | $45.00 | 60.0% | 150.0% |
| $90.00 | $60.00 | 66.7% | 200.0% |
Doubling the cost ($60) is a 100% markup but only a 50% margin. Someone who asks for "50% margin" and gets a 50% markup ends up with 33.3%.
Where margin math goes wrong
Most pricing errors come from one of these.
Dividing by cost
Profit ÷ cost is markup, not margin. Report the wrong one and every margin looks bigger than it is.
Adding the margin to cost
$30 + 40% = $42 gives a 28.6% margin, not 40%. For a 40% margin divide by 0.6: $50.
Calling it margin before selling costs
Fees, free shipping and returns can take half the gross margin. Look at net margin before you set a discount.
Leaving tax in the price
VAT or sales tax collected is not revenue. Strip it out first or the margin is overstated.
The revenue side, measured from real orders
TapCub does not know your cost of goods, but it measures the order side of the margin from your purchase and refund events.
GMV, AOV and refund rate
The ecommerce template computes GMV, average order value, checkout completion and refund rate from purchase and refund events.
Learn moreChannel return after ad cost
Import ad spend and see which channel pays back, using the same order definition for every channel.
Learn moreRefunds with a reason
Refunds carry the order, amount and reason, so a promotion with heavy returns does not look better than it was.
Learn moreProfit margin FAQ
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
How do you calculate profit margin?
Gross profit margin = (revenue − cost of goods) ÷ revenue × 100%. An item that costs $30 and sells for $50 has $20 gross profit and a 40% margin. Net profit margin uses net profit — after fees, operating costs and tax — divided by the same revenue.
What is the difference between margin and markup?
Both use the same profit. Margin divides it by the selling price; markup divides it by cost. $20 profit on a $30 item sold for $50 is a 40% margin and a 66.7% markup. The markup calculator has a full conversion table.
How do I find the selling price from cost and margin?
Price = cost ÷ (1 − margin). For a 40% margin on a $30 cost: 30 ÷ 0.6 = $50. Enter cost and margin above and leave price empty.
What is the difference between gross and net margin?
Gross margin subtracts only the cost of the goods. Net margin also subtracts selling and operating costs — fees, shipping, ads, staff, rent — and tax. A product can have a strong gross margin and a thin or negative net margin.
What is a good profit margin?
It depends on the industry and the business model: a reseller and a software company have very different cost structures. Compare with your own history, or with published data for your industry — for example, Aswath Damodaran at NYU Stern publishes gross and net margins by US industry each year.
Can profit margin be more than 100%?
Gross margin cannot, as long as cost is positive: the most you can keep is the whole price. Markup can be any size — 300% is common for low-cost items. A figure above 100% labelled "margin" is almost always a markup.
Where do marketplace fees, shipping and returns go?
Usually below gross profit: commission, payment fees, outbound shipping and ads are selling costs, so they reduce net margin. Inbound freight belongs in cost of goods. Refunds reduce revenue; returned items you can resell go back into stock, while return postage and unsellable items are a loss.
Should I include VAT or sales tax in revenue?
No. Tax collected on behalf of the government is not revenue. Use prices and costs without VAT or sales tax so the margin reflects what you keep.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
From margin to the rest of the plan
Once you know the margin per sale, work out how many sales you need, what each order is worth and which channels earn it back.