Margin Calculator

Margin Calculator

Calculate gross profit, margin, and markup from selling price and cost.

Revenue and Cost

Use selling price or revenue on the same basis as cost.

$
$

How we calculate this

See methodology
  1. Subtract cost from revenue to get gross profit.
  2. Divide gross profit by revenue to calculate margin.
  3. Divide gross profit by cost to calculate markup.

Formula

Gross profit Revenue - Cost
Margin % ((Revenue - Cost) / Revenue) × 100
Markup % ((Revenue - Cost) / Cost) × 100

Worked example

If you sell something for $100 and it costs $60, here is what the math shows.

  1. Gross profit is $100 - $60 = $40.
  2. Margin is $40 / $100 = 40.00%.
  3. Markup is $40 / $60 = 66.67%.

Frequently Asked Questions

What is the difference between margin and markup?

Margin uses revenue as the base. Markup uses cost as the base. They are related, but they are not interchangeable.

Why can margin not be calculated from zero revenue?

Margin divides profit by revenue, so zero revenue would cause a divide-by-zero problem.

Can margin be negative?

Yes. If cost is higher than selling price, gross profit is negative and margin will also be negative.

When should I use margin instead of markup?

Use margin when you want profit as a share of selling price. Use markup when you are pricing from cost.

Methodology and Trust Note

See full methodology

These tools are designed to make the math visible, keep assumptions clear, and give you a practical planning result you can review quickly.

This calculator is for educational and planning purposes only. It does not replace professional financial, tax, accounting, or business advice.

Related Calculators