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:
Solving that relationship for price gives the formula used by the calculator:
Profit is the resulting price minus cost:
The equivalent markup shown in the results is:
Worked example matching the calculator
Use the default inputs: USD 50 cost and 30% desired gross margin.
| Step | Calculation | Result |
|---|---|---|
| Margin rate | 30 ÷ 100 | 0.30 |
| Cost share of price | 1 - 0.30 | 0.70 |
| Selling price | USD 50 ÷ 0.70 | USD 71.43 |
| Profit per unit | USD 71.43 - USD 50 | USD 21.43 |
| Markup on cost | USD 21.43 ÷ USD 50 × 100 | 42.86% |
| Price-to-cost multiple | USD 71.43 ÷ USD 50 | 1.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.