Profit margin and markup calculator
Enter any two of cost, selling price, margin percent and markup percent, and the calculator fills in the other two. Paste a list to price many products at once.
Fill in any two values. The tool calculates the other two.
The working
| Product | Cost | Price | Margin | Markup | Profit |
|---|
How to calculate profit margin and markup
Margin and markup both describe profit, but against different bases. Enter any two values and the tool completes the set and shows each formula with your numbers.
- Choose a currency Pick the currency of your cost and price so that the amounts are formatted correctly.
- Enter two values Fill in any two of cost, price, margin and markup. The two fields you edited last are the ones the tool trusts.
- Read the other two The remaining fields are calculated and shown in a tinted style, so you can tell typed values from results.
- Add a quantity Enter how many units you sell to see the total profit and the total revenue.
- Follow the steps Open the working to see each formula with your own numbers, which makes the result easy to check and to explain.
- Switch to bulk mode Paste one product per line as name, cost, price and optional quantity to get a table with margin and markup for each and a total row.
Tips for pricing with margin
- Decide whether your target is a margin or a markup before you compare prices, and say which one you mean in every discussion.
- Start from the margin you need and work out the price, rather than adding a percentage to cost by habit.
- Include every cost that belongs to the product, such as packaging, shipping and payment fees, before you calculate.
- Check the margin after a discount, because a discount comes out of the price, not out of the cost.
- Use bulk mode to find the products that fall below your target margin.
Common margin and markup mistakes
- Mixing up margin and markup A 25 percent markup is a 20 percent margin. Quoting one as the other changes the price by a noticeable amount.
- Adding the margin percentage to cost To reach a 40 percent margin the price is cost divided by 0.6, not cost multiplied by 1.4.
- Leaving out costs A margin calculated on the purchase price alone overstates profit when freight, fees and returns are real costs.
- Forgetting that tax is not revenue Calculate margin on prices without VAT or sales tax, because that tax is passed on to the authority.
Open it pre-filled with a link
Every field accepts a query parameter with the same name, so a link, a script or an AI agent can fill the tool in and run it. Open an example: /tools/profit-margin-calculator/?cost=60&price=100
| Parameter | Values | What it does |
|---|---|---|
mode | single · bulk (default: single) | single for one product, bulk for a list. |
cost | number | Cost per unit. |
price | number | Selling price per unit, without tax. |
margin | number | Margin in percent of the price. |
markup | number | Markup in percent of the cost. |
qty | number (default: 1) | Units sold, for total profit and revenue. |
currency | EUR · USD · GBP · TRY · CHF · CAD · AUD · SEK · PLN (default: EUR) | Currency as a three-letter code. |
bulk | text | One product per line as NAME;COST;PRICE[;QTY]. Separate columns with a tab, semicolon or vertical bar. |
What this margin calculator includes
It calculates profit measures from the numbers you enter. It stores nothing, and it does not guess costs or prices.
- Any two values Cost and price, cost and margin, price and markup, or any other pair. The tool works out the rest.
- Margin and markup side by side Both percentages are always shown together, so you can see how one converts into the other.
- Profit per unit and in total Add a quantity to see the profit per unit and the total profit and revenue.
- Formulas with your numbers Every step is written out, so a colleague or a client can follow how the figure was reached.
- Bulk table Paste a list from a spreadsheet and get margin, markup and profit for every row, with a total row.
- Copy to a spreadsheet Copy the bulk table as tab-separated text and paste it back into your sheet.
- Nine currencies Amounts follow the page language and the selected currency.
- Private by design The numbers are calculated in your browser and are never uploaded.
Margin and markup for the same product
| Margin | Markup | Price when cost is 100 |
|---|---|---|
| 10 percent | 11.1 percent | 111.11 |
| 20 percent | 25 percent | 125.00 |
| 30 percent | 42.9 percent | 142.86 |
| 40 percent | 66.7 percent | 166.67 |
| 50 percent | 100 percent | 200.00 |
Who uses a margin calculator
Whenever a price is set, discussed or checked, margin and markup are the numbers people reach for.
Shops and online sellers
Set a price that reaches your target margin after costs, and test what a discount does to it.
Manufacturers and makers
Convert a production cost and a target margin into a list price.
Wholesalers and distributors
Compare the margin on many products at once with a pasted list.
Agencies and service firms
Check the margin on a fixed-price project from the cost of the time and the price quoted.
Buyers and negotiators
Estimate a supplier's margin from your price and an assumed cost to prepare a negotiation.
Finance teams
Translate between the margin used in reporting and the markup used on the sales floor.
Margin and markup depend on which costs you include. Use the result as a pricing aid and confirm it against your own accounts.
How this connects to running the business
A margin is only as good as the costs behind it. When purchase prices, landed costs, discounts and sales are kept in different files, the margin you quote and the margin you earn drift apart. We build Dika Ops so that costs, prices and sales sit in one place and margin is reported from real orders. Learn more at dikaops.com
Frequently asked questions
What is the difference between margin and markup?
Margin is profit as a share of the selling price. Markup is profit as a share of the cost. For a cost of 80 and a price of 100, the profit is 20: that is a 20 percent margin and a 25 percent markup.
How do I calculate margin?
Subtract cost from price and divide by price: margin = (price − cost) ÷ price. Multiply by 100 for a percentage.
How do I calculate markup?
Subtract cost from price and divide by cost: markup = (price − cost) ÷ cost. Multiply by 100 for a percentage.
How do I find the price for a target margin?
Divide the cost by one minus the margin. For a cost of 60 and a 40 percent margin, the price is 60 ÷ 0.6 = 100.
Why does the tool use the two fields I edited last?
Any two of the four values define the other two. The tool treats the two most recent edits as your inputs and recalculates the rest, so you can change your mind at any time.
What format does bulk mode expect?
One product per line: name, cost, price and an optional quantity, separated by a tab, a semicolon or a vertical bar. Lines with only cost and price also work. A comma separates the columns when no other separator is used.
Can margin be negative?
Yes. If the price is below the cost, the margin and the markup are negative, which means a loss on each unit.
Can I link to a calculation?
Yes. Every control accepts a query parameter, and the order of the parameters decides which two values are used. The list is in the first tab.
Have a project in mind? Let us talk it through.
Tell us what you want to build or improve. We reply with a clear next step.