Margin Calculator

This professional-grade margin calculator helps founders, product managers, and finance teams compute gross profit, profit margin, markup, target price, or allowable cost in seconds. It’s optimized for accessibility, mobile usability, and trustworthy results.

Interactive Calculator

Choose calculation mode
Pick what you want to compute. The form adapts accordingly.

Results

Cost $0.00
Price $0.00
Gross Profit $0.00
Profit Margin 0.00%
Markup 0.00%
Break-even Price $0.00

Data Source and Methodology

Authoritative reference: Investopedia, “Profit Margin: What It Is, Types, How to Calculate It,” last updated May 09, 2024. Direct link: https://www.investopedia.com/terms/p/profitmargin.asp.

All calculations are strictly based on the formulas and data provided by this source.

The Formula Explained

Gross profit: $$ P = \text{Price} - \text{Cost} $$

Gross margin (as a percentage): $$ \text{Margin}(\%) = \frac{P}{\text{Price}} \times 100 $$

Markup (as a percentage): $$ \text{Markup}(\%) = \frac{P}{\text{Cost}} \times 100 $$

Price from cost and target margin: $$ \text{Price} = \frac{\text{Cost}}{1 - \text{Margin}} $$

Cost from price and margin: $$ \text{Cost} = \text{Price} \times (1 - \text{Margin}) $$

Margin in the last two formulas is expressed as a decimal (e.g., 40% = 0.40).

Glossary of Variables

  • Cost: Total cost per unit to produce or acquire a product or service.
  • Price: Selling price per unit charged to the customer.
  • Gross Profit (P): Price minus Cost.
  • Profit Margin (%): Gross profit divided by Price, expressed as a percentage.
  • Markup (%): Gross profit divided by Cost, expressed as a percentage.
  • Break-even Price: The price at which profit equals zero (equal to Cost in this context).

How It Works: A Step-by-Step Example

Suppose your cost is $25 and your selling price is $40.

  1. Compute gross profit: using $$P = \text{Price} - \text{Cost}$$, we get $40 − $25 = $15.
  2. Compute margin: $$\text{Margin} = \frac{P}{\text{Price}} = \frac{15}{40} = 0.375 = 37.5\%$$.
  3. Compute markup: $$\text{Markup} = \frac{P}{\text{Cost}} = \frac{15}{25} = 0.6 = 60\%$$.
  4. Break-even price equals cost: $25.

If you instead target a 40% margin and your cost is $25, compute price as $$\text{Price} = \frac{25}{1 - 0.40} = \frac{25}{0.60} = 41.67$$ (rounded).

Frequently Asked Questions (FAQ)

What is the difference between margin and markup?

Margin = Profit ÷ Price; Markup = Profit ÷ Cost. For the same transaction, markup is always higher than margin.

Can gross margin exceed 100%?

No. Since Profit ≤ Price, margin is always less than 100%.

What happens if price equals cost?

Profit is zero, so both margin and markup are 0%. Your break-even price equals your cost.

Can I get negative margin?

Yes. If your price is below cost, margin is negative, indicating a loss.

How do discounts and taxes affect the result?

Include them within the price or cost figures you input. The calculation reflects whatever is entered.

Is markup better than margin for pricing?

Margin is preferred for financial reporting comparability, while markup can be intuitive for cost-plus pricing. This calculator shows both to avoid conversion errors.

What currency should I use?

Any. Pick a symbol from the drop-down; all computations are unit-agnostic.

Tool developed by Ugo Candido. Content verified by CalcDomain Editorial Board.
Last reviewed for accuracy on: .