Skip to content
OverCalculator
  1. Home
  2. Financial
  3. Margin Calculator
Financial

Margin Calculator

Calculate the selling price needed for a target gross margin from cost, including profit per unit, markup, and price-to-cost multiple.

By OverCalculator Editorial Team, Updated

Selling price
Selling price
$71.43
Profit per unit
$21.43
Gross margin
30%
Markup on cost
42.86%
Price-to-cost multiple
1.429×

30% margin on $50.00 cost requires a $71.43 price, equal to 42.86% markup.

$
%

Results update as you type.

Margin Calculator

The margin calculator finds the selling price required to achieve a target gross margin from a known cost. Enter cost and desired gross margin. The calculator returns selling price, profit per unit, gross margin, equivalent markup on cost, and the price-to-cost multiple. It is useful when a business thinks in revenue percentages rather than cost-plus markups: retail margin targets, wholesale agreements, product-line scorecards, or service quotes that must leave a specific share of revenue as gross profit.

Gross margin is price-based. It measures what portion of the selling price remains after paying the direct cost of the item or service. If a dashboard says a product line should earn 30% gross margin, it means 30 cents of each revenue dollar should remain as gross profit before overhead. That is different from adding 30% to cost, which is markup. This page keeps that distinction visible because confusing the two is a common pricing error.

How to use this calculator

Enter cost for one unit, job, order, or service package. Use the cost that should be recovered by the selling price: product cost, materials, direct labor, packaging, inbound freight, processing fees, or job-specific subcontractors. Then enter the desired gross margin as a percentage of the final selling price. The calculator requires cost above zero and margin below 100%. It can model negative margins, but a negative result means the price is below cost.

The primary result is the pre-tax selling price. Sales tax, tips, optional fees, or discounts should normally be handled after the pre-tax price is set. To compare the cost-plus version of the same decision, use the markup calculator. To see how the resulting profit supports fixed costs, use the contribution margin calculator and break-even calculator.

Formula

Gross margin is profit divided by price:

gross margin=pricecostprice×100\text{gross margin} = \frac{\text{price} - \text{cost}}{\text{price}} \times 100

Solving that relationship for price gives the formula used by the calculator:

price=cost1gross margin100\text{price} = \frac{\text{cost}}{1 - \frac{\text{gross margin}}{100}}

Profit is the resulting price minus cost:

profit=pricecost\text{profit} = \text{price} - \text{cost}

The equivalent markup shown in the results is:

markup=profitcost×100\text{markup} = \frac{\text{profit}}{\text{cost}} \times 100

Worked example matching the calculator

Use the default inputs: USD 50 cost and 30% desired gross margin.

StepCalculationResult
Margin rate30 ÷ 1000.30
Cost share of price1 - 0.300.70
Selling priceUSD 50 ÷ 0.70USD 71.43
Profit per unitUSD 71.43 - USD 50USD 21.43
Markup on costUSD 21.43 ÷ USD 50 × 10042.86%
Price-to-cost multipleUSD 71.43 ÷ USD 501.429×

The calculator’s primary result is USD 71.43. At that price, USD 21.43 of the sale is gross profit. USD 21.43 divided by the selling price is 30%, so the margin target is met. But USD 21.43 divided by the USD 50 cost is 42.86%, so the equivalent markup is higher. This is not a bug; it is the denominator difference.

Markup vs. margin without ambiguity

Margin is price-based. Markup is cost-based. Suppose an item costs USD 100. A 30% markup gives a USD 130 price and USD 30 profit. The margin is USD 30 divided by USD 130, or 23.08%. A 30% margin gives a price of USD 142.86 and profit of USD 42.86. The markup is 42.86%. The words sound similar, but the prices are different enough to change profitability.

Use margin when you are comparing revenue streams, reading an income statement, setting product-line targets, or talking with finance teams. Use markup when you are starting from cost and adding a standard percentage for quoting. If a supplier, manager, or customer says “30 points,” ask whether the base is cost or price before entering the number.

Benchmarks and interpretation

A “good” gross margin depends on industry, channel, returns, labor intensity, inventory risk, and customer acquisition cost. Software and digital products can show high gross margins because incremental delivery costs are low. Grocery and fuel can operate with thin margins but high volume. Professional services may show high gross margin on direct labor yet still need enough revenue to cover nonbillable time, sales effort, and administration.

Rather than copying an outside benchmark, compare margin with your own history and the costs that sit below gross profit. If a 30% gross margin does not cover rent, payroll, marketing, and taxes at expected volume, the target is too low even if it looks normal for the category. If a higher margin causes demand to fall sharply, the price may be unrealistic. The percent off calculator is useful for checking how promotions reduce realized margin after the list price is set.

Practical tips

  • Keep gross margin and net margin separate. Gross margin looks only at revenue minus direct cost; net margin includes overhead and other expenses.
  • Recalculate after cost changes. A supplier increase can turn a formerly safe price into a weak margin.
  • Treat shipping subsidies, returns, breakage, and marketplace fees as costs if they are tied to each order.
  • Avoid targets near 100% unless cost is very small relative to price. The formula becomes extremely sensitive.
  • Use the sales tax calculator for tax added at checkout; sales tax is usually not part of gross margin.

Sources

  • AccountingTools, Gross margin — gross margin definition and formula.
  • AccountingTools, Markup — cost-based markup definition for comparison.
  • U.S. Small Business Administration, Manage your finances — pricing and financial-management context for small businesses.

Frequently asked questions

What is gross margin?
Gross margin is gross profit as a percentage of selling price. If a product costs 50 dollars and sells for 71.43 dollars, the profit is 21.43 dollars. That profit is 30% of the selling price, so the sale has a 30% gross margin.
How does this calculator find price from margin?
It treats cost as the part of price that is not margin. For a 30% margin, cost is 70% of price. The calculator divides cost by 1 minus the margin rate, so 50 dollars divided by 0.70 gives a required price of 71.43 dollars.
Why is margin not the same as markup?
Margin divides profit by selling price, while markup divides profit by cost. On a profitable sale, price is higher than cost, so the same profit produces a lower margin percentage and a higher markup percentage. Mixing them up can cause serious underpricing or overpricing.
Can the target margin be negative?
Yes. A negative margin means the selling price is below cost and the sale loses money before overhead. The calculator allows negative percentages because clearance, liquidation, or strategic promotions sometimes do that deliberately. The result should be treated as a loss scenario, not a healthy price.
Why can margin not be 100%?
With a positive cost, a 100% gross margin would mean cost is zero and the entire selling price is profit. Because the calculator starts from a cost greater than zero, it requires the target margin to be below 100%. As the target approaches 100%, required price rises sharply.
Should I use gross margin or net margin?
Use this calculator for gross margin on a unit, job, or sale before operating expenses. Net margin subtracts rent, salaries, software, interest, taxes, and other overhead from total profit. Gross margin is best for pricing; net margin is better for evaluating overall business profitability.

Related calculators

Margin Calculator updated at