Margin & Markup Calculator
Calculate gross profit, gross margin %, markup %, and target selling price from cost in your browser.
About this tool
A margin and markup calculator converts between unit cost, selling price, gross profit, gross margin percentage, and markup percentage so you never confuse margin on revenue with markup on cost. In target-margin mode, selling price is Cost / (1 − margin / 100). Margins of 100% or higher are mathematically impossible for positive costs and trigger an input validation guard.
How to use the margin calculator
- Choose a mode: Cost + Selling Price, or Cost + Target Margin.
- Enter the unit cost of the product.
- Enter the selling price, or the target gross margin percentage, depending on the mode.
- Read the gross margin, the markup and the profit per unit.
- Copy the breakdown for a pricing sheet.
Margin and markup are different
Gross margin is the share of the selling price that you keep after the cost of the product. It is calculated as the profit divided by the selling price. Markup is the profit divided by the cost. A product that costs 60 and sells for 100 has a margin of 40 per cent and a markup of about 66.7 per cent.
The two are often confused, and a 50 per cent markup does not give a 50 per cent margin. Pricing by margin is common in retail, and pricing by markup is common in trade and wholesale.
A worked example
If a product costs 60 and you want a 40 per cent margin, the selling price must be 60 divided by 0.6, which is 100. Switching to Cost + Target Margin with 40 per cent entered gives the same price, which shows the two modes agree.
- Set a price for a new product that must keep a 35 per cent margin after the supplier's cost.
- Compare the markup on two suppliers to decide which offers the better return.
Who uses a margin calculator
- Retailers and e-commerce sellers setting prices.
- Wholesalers and distributors working out markups.
- Freelancers and service businesses pricing their work.
- Finance students learning gross profit analysis.
- Owners reviewing whether a discount still leaves enough profit.
Tips and limits
- A margin calculation uses only the unit cost. Add shipping, packaging, fees and returns to reach a true profit figure.
- Check that the margin target is above zero and below 100 per cent. A margin of 100 per cent needs a free product.
- Test a discounted price against the cost before you publish a sale.
- The result is a planning figure. Your accountant may treat costs differently for tax purposes.
- The calculation runs in your browser and nothing is stored.
Frequently asked questions
Related browser tools
Compound Interest Calculator
Project compound interest growth with monthly contributions, compounding frequency options, effective APY, and CSV export in your browser.
Discount Calculator
Calculate sale price, savings, sequential stacked discounts, and sales tax privately in your browser.
EMI / Loan Calculator
Calculate monthly loan EMI, total interest payable, principal-to-interest breakdown, and yearly amortization schedule privately in your browser.