How to Calculate Margin and Markup Online Free
To calculate profit margin, enter your cost and selling price into the Margin & Markup Calculator and it instantly returns profit, margin (profit as a percentage of price) and markup (profit as a percentage of cost). To find the price for a target margin, switch modes and enter the cost and the margin you want. Everything runs in your browser, so your costs and prices are never uploaded.
What the calculator does
Pricing has three numbers that get tangled together: profit, margin, and markup. This tool untangles them. Give it a cost and a price and it shows all three at once, with margin and markup displayed side by side so you never confuse the two. It also works in reverse β tell it the cost and the margin you are targeting, and it returns the exact selling price you should charge. It is built for retailers, freelancers, resellers, and anyone quoting a job.
Step by step: from cost and price to margin
- Select your currency so the results display in the symbol you work in.
- Choose the "cost & selling price" mode. This is the standard direction when you already know both numbers.
- Enter the cost price of the item β what it costs you to buy or make.
- Enter the selling price you charge the customer.
- Read the results: profit, profit margin, and markup appear together. For a $60 cost sold at $100, you will see $40 profit, a 40% margin, and a 66.7% markup.
Step by step: pricing for a target margin
When you know the margin you need but not the price, use reverse mode:
- Switch to "cost & target margin" mode.
- Enter the cost price.
- Enter the target margin as a percentage β say 40%.
- Read the required selling price. The tool divides the cost by (1 β margin Γ· 100); a $60 cost at a 40% target margin returns a $100 price.
Because a margin of 100% or more is mathematically impossible β it would mean zero or negative cost β the calculator caps the target below 100% and warns you if you enter too high a value.
Margin vs markup at a glance
| Cost | Price | Profit | Margin | Markup |
|---|---|---|---|---|
| $60 | $100 | $40 | 40.0% | 66.7% |
| $80 | $100 | $20 | 20.0% | 25.0% |
| $50 | $125 | $75 | 60.0% | 150.0% |
Notice the margin is always the smaller number for the same profit, because it is measured against the larger figure (price) rather than the smaller one (cost). Mixing them up is the most common pricing error, which is why the tool shows both.
Why in-browser and private matters
All calculations happen locally in your browser with nothing sent to a server, so your margins, costs, and quoted prices stay confidential β useful when you are pricing against competitors or preparing a sensitive client quote. It also means the tool works offline once loaded, and there is no sign-up. Results are estimates to guide pricing decisions and are not financial advice.
Try the Margin & Markup Calculator β free and 100% in your browser.
FAQ
What is the difference between margin and markup?
Margin is profit as a percentage of the selling price; markup is profit as a percentage of the cost. The same $40 profit on a $60 cost sold at $100 is a 40% margin but a 66.7% markup, so always confirm which one a supplier or client means.
How do I find the price for a specific margin?
Use the reverse mode: enter the cost and the target margin, and the calculator returns the price by dividing cost by (1 β margin Γ· 100). It saves you from guessing a price and checking the margin repeatedly.
Why won't the calculator accept a 100% margin?
A 100% margin implies zero cost, and anything above it is impossible because profit cannot exceed the whole selling price. The tool caps the target below 100% and warns you, preventing a nonsensical price.
Is my pricing data kept private?
Yes. Every calculation runs in your browser and nothing is transmitted, so your costs, prices, and margins never leave your device.
Related free tools
- Break-Even Calculator β find the units needed to cover costs.
- Discount Calculator β work out sale prices and savings.
- ROI Calculator β measure return on an investment.
- Percentage Calculator β quick everyday percentage math.
Built by ByteVancer
ByteTools is a free product of ByteVancer, a software and web development studio building web apps, SaaS, and custom software. If you need a pricing tool or internal calculator built for your business, explore how ByteVancer can help.
Recommended reading
Margin Calculator Use Cases: Real Pricing Examples
Real margin and markup use cases with worked examples for retailers, resellers, freelancers and quoting jobs β price with confidence in your browser.
Margin Calculator Tips: Price Smarter, Avoid Mistakes
Expert margin and markup pricing tips: dodge the margin-markup mix-up, protect profit against discounts, and avoid the costly pricing mistakes.
XOR Cipher Use Cases: CTFs, Learning, and Puzzles
Real use cases for the XOR cipher, from CTF challenges and teaching bitwise logic to lightweight obfuscation, with concrete worked examples.
XOR Cipher Tips: Keys, Security, and Common Mistakes
Pro tips and common mistakes for the repeating-key XOR cipher: key length, reuse pitfalls, format choices, and when to switch to real encryption.