Commerce & Accounting Tools

Markup & Margin Calculator

Enter the cost price and selling price for one unit. The calculator shows the gross profit or loss, then separates markup (measured against cost) from gross margin (measured against selling price) so the two are not confused.

This calculator covers gross profit, markup and margin only. It does not automatically include overheads, taxes, shipping or other operating expenses unless they are already built into the cost price you enter.

Calculator

Enter values and calculate
Your result will appear here

The calculation runs in your browser.

What is a Markup & Margin Calculator?

A markup and margin calculator takes a cost price and a selling price and reports the gross profit as two different percentages: markup, which is measured against cost, and gross margin, which is measured against selling price. Commerce students and small business owners use it to avoid one of the most common pricing mix-ups — treating a markup percentage as if it were the same as a margin percentage.

Formula and calculation method

Gross Profit = Selling Price − Cost Price. Markup Percentage = (Gross Profit ÷ Cost Price) × 100. Gross Margin Percentage = (Gross Profit ÷ Selling Price) × 100.

What this calculator does

Takes a cost price and a selling price, works out the gross profit or loss between them, and reports that same figure as two different percentages: markup (against cost) and gross margin (against selling price).

How to interpret the result

Look at gross profit first to see whether the sale is profitable at all. Then use markup when the question is about pricing (“how much did I add on top of cost?”) and margin when the question is about revenue (“what share of what I charged is profit?”). The two percentages will not match, and that is expected, not an error.

Assumptions

  • Cost price and selling price are entered in the same currency and on the same tax basis (both including tax or both excluding it).
  • The cost price entered is treated as the full cost base for the markup and margin formulas; it is not automatically adjusted for anything not included in it.
  • The calculation is for one unit; multiply the results by quantity yourself if you need totals for a batch.

Limitations

  • Does not automatically include overheads, shipping, payment processing fees, discounts or tax unless they are already part of the cost price entered.
  • A positive margin on a single unit does not by itself prove the overall business is profitable once fixed costs and other expenses are included.
  • Markup and margin cannot be calculated when their respective denominator (cost price for markup, selling price for margin) is zero.

How it works

Gross profit is selling price minus cost price. Markup percentage divides that gross profit by the cost price, showing how much has been added on top of what the item cost. Gross margin percentage divides the same gross profit by the selling price instead, showing what share of the revenue collected is gross profit. Because the two percentages use different denominators, they are never equal except when both are zero.

Worked example

An item costs 80 and sells for 100. Gross profit is 100 minus 80, which is 20. Markup percentage is 20 divided by 80, which is 25%. Gross margin percentage is 20 divided by 100, which is 20%. The same 20 of gross profit produces two different percentages depending on which base is used.

How to use it

  1. Enter the cost price of one unit.
  2. Enter the selling price of one unit.
  3. Press Calculate.
  4. Read the gross profit or loss, then compare markup percentage against gross margin percentage.

Factors to consider

  • Markup divides gross profit by cost price; gross margin divides the same gross profit by selling price. They answer different questions and are not interchangeable.
  • If cost price is 0, markup percentage cannot be calculated, since dividing by a cost of zero is undefined.
  • If selling price is 0, gross margin percentage cannot be calculated for the same reason.
  • When selling price is below cost price, the result is a loss rather than a profit, and both percentages become negative.
  • This calculator does not automatically add overheads, taxes, shipping, payment fees or discounts. Build those into the cost price first if they should be included.

Useful for

  • Commerce and accounting students checking markup and margin questions from a textbook.
  • Small business owners comparing a proposed selling price against a target margin.
  • Anyone who has seen a markup percentage and a margin percentage disagree and wants to understand why.
  • Quick pricing sanity checks before setting a retail price.

What is markup?

Markup is gross profit expressed as a percentage of cost price. It answers the pricing question “how much was added on top of what this item cost me?” A markup of 25% means the selling price is the cost price plus a quarter of that cost price again.

What is gross margin?

Gross margin is the same gross profit expressed as a percentage of selling price instead. It answers a different question: “of the money a customer pays, what share is left as gross profit after covering the cost of the item?” A 20% margin means 20 cents of every dollar in revenue is gross profit.

Difference between markup and margin

Markup and margin use the same gross profit figure but divide it by different bases — cost price for markup, selling price for margin — so they are almost never equal. Because selling price is larger than cost price on a profitable sale, margin percentage is always lower than markup percentage for the same transaction. Confusing the two is one of the most common pricing mistakes in commerce coursework and in small business pricing.

Common mistakes

Besides confusing markup with margin, a frequent error is applying a markup percentage to the selling price instead of the cost price (or a margin percentage to the cost price instead of the selling price), which produces the wrong figure entirely. Another is forgetting that a cost price of 0 makes markup mathematically undefined, and a selling price of 0 makes margin undefined — the calculator flags both rather than showing an incorrect number.

Frequently asked questions

What is the difference between markup and margin?

Markup is gross profit divided by cost price. Margin is the same gross profit divided by selling price instead. Because selling price is always higher than cost price on a profitable sale, margin percentage is always lower than markup percentage for the same transaction.

Why can't I calculate markup when cost price is 0?

Markup percentage is gross profit divided by cost price. Dividing by zero has no defined result, so the calculator shows that markup is not available rather than an incorrect number.

Is a bigger markup always better?

Not necessarily. A large markup on a low-cost item may still produce a small absolute profit, and a very high price can reduce how many units actually sell. Markup is one input into a pricing decision, not the whole decision.

Does this calculator include tax or other business expenses?

No. It calculates gross profit, markup and margin from cost price and selling price only. Taxes, overheads, shipping and other costs need to be included in the cost price if you want them reflected in the result.