Margin Calculator

Calculate gross margin and markup from cost and selling price, or find the selling price needed for a target margin. Keep the two percentage bases distinct.

Gross margin divides gross profit by selling price; markup divides the same profit by cost. Choose between checking an existing price and calculating a price from a target margin. Enter the costs appropriate to your own pricing task; the calculator does not determine them.

  • 100% free
  • No registration
  • On your device
  • Modern browser
  1. 1Enter details
  2. 2View result

Gross margin divides profit by selling price; markup divides profit by cost. Markup is undefined for zero cost.

Calculation resultLive
Gross profit
40.00
Gross margin percent
40.00
Markup percent
66.67

Your input stays on this device for this operation. We don’t upload or store it.

About Margin Calculator

Gross margin divides gross profit by selling price; markup divides the same profit by cost. Choose between checking an existing price and calculating a price from a target margin. Enter the costs appropriate to your own pricing task; the calculator does not determine them.

Margin and markup

The first mode shows gross profit, margin and markup when cost is positive.

Target-price mode

Calculates cost divided by one minus the target margin fraction.

Loss visibility

A selling price below cost produces negative gross profit and margin.

How to use Margin Calculator

  1. 1

    Choose the pricing calculation

    Select Calculate margin from selling price or Calculate selling price from target margin.

  2. 2

    Enter the relevant values

    For margin, enter Cost and a positive Selling price. For a target price, enter Cost and a target below 100%.

  3. 3

    Compare the correct percentage

    Read gross margin separately from markup. Changing modes resets the fields for that mode.

Formats and practical limits

Input: cost and selling price, or cost and target margin from 0 to 99.99%. Output: pricing amounts/percentages displayed to two decimal places.

  • No tax, fee, shipping or cost-category discovery; include relevant costs in your own inputs.
  • Target-price mode accepts non-negative targets only; this is a pricing calculation rather than a profitability forecast.

Practical example

Cost 60 and target margin 40% require selling price 100.00. A 40% markup on that cost would instead give 84.00.

Further reading

Frequently Asked Questions

3 answers
Is 40% margin the same as 40% markup?

No. At cost 60 and price 100, margin is 40% and markup is about 66.67%.

Why is markup absent when cost is zero?

Markup would divide by zero, so that result is omitted.

Does this calculate net business profit?

No. It uses the cost and selling price you supply. Use Profit Calculator to subtract entered total costs from revenue.