Business · Pricing calculator

Reverse Margin Calculator

Work backward from a selling price and target gross margin to find the highest unit cost that fits, or start with cost to find the required price. The result also converts margin to markup so the two percentages are not confused.

Interactive calculatorMargin and markup shownPer-unit planning
Updated:July 20, 2026
MethodGross margin and markup conversion
Best forProduct and service pricing
Result basisOne unit or billable item

Calculate cost, price, margin, and markup

Choose the direction of the calculation. All amounts are per unit, but the same formula works for a project, order, or service package when cost and price use the same basis.

Only the two amounts named by the selected method drive the result.
Customer price before any sales tax.
Include each cost you want the gross margin to cover.
Margin is profit divided by selling price, not by cost.

Primary result

Allowable unit cost$70.00
Gross profit per unit$30.00
Selling price$100.00
Gross margin30%
Equivalent markup42.86%
Cost share of price70%
At $100.00 with a 30% gross margin, allowable unit cost is $70.00.
Use the result

Turn a percentage target into a pricing decision

Margin and markup use different denominators. Keep the chosen cost basis consistent before comparing products or scenarios.

What changes the result most

Target gross margin usually moves the result most. A small increase can produce a much larger change in allowable cost or required price as the target approaches 100%.

What to do next

List the costs that belong in the unit-cost basis, rerun the calculation with expected discounts or returns, and compare the result with the price customers will accept.

When a reverse margin calculation helps

A normal margin calculation starts with cost and selling price. A reverse margin calculation starts with a business constraint—usually a planned selling price or a target gross margin—and solves for the missing number.

Use the first mode when the market price is already known. For example, if customers will pay about $100 and the product needs a 30% gross margin, the calculator finds a $70 allowable unit cost. That result can become a purchasing ceiling, manufacturing cost target, or scope limit.

Use the second mode when cost is known and you need a price. Use the third mode when both cost and price are known and you want to compare gross margin with markup.

Formula / methodology

Let P be selling price, C be unit cost, and M be gross margin as a decimal.

Gross profit = P − C Gross margin = (P − C) ÷ P Allowable cost = P × (1 − M) Required selling price = C ÷ (1 − M) Markup = (P − C) ÷ C

Gross margin uses selling price as the denominator. Markup uses cost as the denominator. Because the denominators differ, equal percentages do not describe the same price relationship.

A target gross margin must be below 100%. At 100%, the denominator in the required-price formula becomes zero; above 100%, a nonnegative cost cannot satisfy the target.

Assumptions and limitations

  • All amounts refer to the same unit, order, project, or service package.
  • The selling price excludes sales tax collected for a taxing authority.
  • The unit cost includes only the expenses you enter. A narrow product cost and a fully loaded cost produce different answers.
  • This is a gross-margin calculation, not a net-profit forecast. Rent, payroll, marketing, financing, income tax, overhead, and owner compensation still matter unless allocated into unit cost.
  • Discounts, refunds, spoilage, payment fees, freight, and marketplace commissions can reduce realized margin. Include them in cost or compare a second scenario.
  • Rounding is to two currency decimals and two percentage decimals for display; calculations use unrounded values.

Worked examples

1. Find allowable cost from price and margin

A product sells for $100 and needs a 30% gross margin. Allowable cost is $100 × (1 − 0.30) = $70. Gross profit is $30. Markup is $30 ÷ $70 = 42.86%.

2. Find selling price from cost and margin

A service package costs $80 to deliver and needs a 20% gross margin. Required selling price is $80 ÷ (1 − 0.20) = $100. Gross profit is $20, and the equivalent markup is 25%.

3. Measure a loss scenario

If cost is $120 and selling price is $100, gross profit is −$20. Gross margin is −$20 ÷ $100 = −20%, while markup is −$20 ÷ $120 = −16.67%.

Common mistakes

  • Using margin and markup as synonyms. A 30% margin requires a 42.86% markup on cost.
  • Dividing by the target margin. Price from cost uses cost ÷ (1 − margin), not cost ÷ margin.
  • Leaving meaningful costs out. Freight, packaging, payment fees, labor, or returns may belong in the unit-cost basis.
  • Applying a discount after setting the target. A lower realized price reduces the actual gross margin unless cost also changes.
  • Calling gross margin net profit. Gross margin does not account for every operating and financing expense.

FAQ

What is the difference between margin and markup?

Gross margin divides gross profit by selling price. Markup divides the same gross profit by cost. At a $100 price and $70 cost, margin is 30%, while markup is 42.86%.

How do I find selling price from cost and target margin?

Divide cost by one minus the margin rate. For an $80 cost and 20% target margin, $80 ÷ 0.80 = $100.

How do I find allowable cost from price and margin?

Multiply selling price by one minus the margin rate. For a $100 price and 30% margin, $100 × 0.70 = $70.

Why is markup higher than margin?

Markup divides profit by the smaller cost amount, while margin divides profit by the larger selling price. When profit is positive, markup is therefore higher than margin.

Does gross margin include every business expense?

No. The result includes only the cost entered. Add relevant unit costs or run additional scenarios for payment fees, returns, discounts, freight, labor, and overhead.

Can margin be negative?

Yes. If cost exceeds selling price, gross profit and gross margin are negative. The calculator shows that result in the cost-and-price mode.

Sources and assumptions

The formula follows standard gross-margin and markup definitions. The cost basis still depends on how the business classifies product and service costs.

Last reviewed: July 20, 2026. Calculation basis: gross profit, gross margin, markup, and algebraic rearrangement of the margin equation.