Margin and Markup Calculator
The Margin and Markup Calculator converts one pricing scenario between cost, revenue, gross profit, gross margin, and markup. the inputs has four modes: Cost and revenue, Cost and margin, Cost and markup, and Revenue and margin. The main result is gross profit. The details show revenue, cost, gross margin, markup on cost, and the price-to-cost multiple.
The slug for this page suggests “2 sets,” but the current calculation does not compare two products or two sets side by side. It completes one pricing set at a time. That limitation is important to state honestly: if you need to compare two products, quotes, or product sets, run the calculator twice and compare the resulting gross profit, margin, markup, and multiple manually.
This page overlaps with several siblings, but each has a different job. The margin calculator is best when you already know a target margin and want a focused price. The markup calculator is best for one-way cost-plus pricing. The classic margin page audits only known cost and revenue, while the classic markup page solves price, cost, or markup. This page is the broader converter between margin and markup language. If tax changes the customer total, calculate the pre-tax price here and then use the sales tax calculator or vat calculator.
What the calculator does
The calculation method starts by reading the selected mode. In Cost and revenue mode, it uses both values as entered. In Cost and margin mode, it divides cost by one minus margin divided by 100 to find revenue. In Cost and markup mode, it multiplies cost by one plus markup divided by 100. In Revenue and margin mode, it multiplies revenue by one minus margin divided by 100 to infer cost.
After cost and revenue are known, every mode uses the same finishing calculations. Gross profit is revenue minus cost. Gross margin is profit divided by revenue. Markup is profit divided by cost. The price-to-cost multiple is revenue divided by cost. Cost and revenue must end up positive, so scenarios that imply zero or negative cost or revenue are rejected.
Formula
For a completed pricing scenario:
Solving from cost and target margin:
Solving from cost and markup:
Solving from revenue and margin:
Checking a margin and markup scenario
Use the default Cost and revenue mode with $80 cost and $120 revenue. The calculator does not need to solve a missing value in this mode, so it moves directly to profit:
Gross margin is:
Markup is:
The price-to-cost multiple is:
The main result is $40 gross profit. The result details show $120 revenue, $80 cost, 33.33% gross margin, 50% markup on cost, and a 1.5× price-to-cost multiple. If you switch to Cost and margin and enter $80 plus 33.33%, the calculator solves revenue at about $119.99 because the input margin is rounded to two decimals; using the exact one-third margin would return $120.
Use cases by mode
Use Cost and revenue to audit a known sale or quote. It answers, “What did this deal actually earn before overhead?” Use Cost and margin when finance gives a margin target and you need the required selling price. Use Cost and markup when purchasing, estimating, or retail teams work from a cost-plus rule. Use Revenue and margin when a sales target and margin requirement are fixed and you want to know the maximum cost allowed.
The calculator is also useful for translating between teams. A sales manager may speak in gross margin, a buyer may speak in markup, and an owner may care about gross profit dollars. Because the tool shows all three after every solve mode, it gives everyone the same completed pricing picture.
Caveats and interpretation
This is a gross-level calculator. It does not subtract operating expenses, financing costs, income taxes, owner salary, marketing, or overhead unless you include those amounts in cost. It also does not apply discounts or customer taxes. If a discount is expected, use the discounted revenue for margin analysis or calculate the discount separately before entering revenue.
Be careful with rounded percentages. A displayed 33.33% margin is not exactly one third, so solving backward from it may produce $119.99 rather than $120. That is not a calculation error; it is normal percentage rounding. The real functional mismatch is the page slug: the current input modes does not compare two sets despite the slug name.
Finally, keep pass-through tax out of revenue for ordinary gross margin work. Sales tax and VAT can change the customer-facing total, but they do not usually increase gross profit. Price the business economics first, then add tax with the appropriate tax calculator.
Sources
- Corporate Finance Institute, Gross margin — gross margin formula and interpretation.
- Corporate Finance Institute, Markup — markup definition and relationship to cost.
- AccountingTools, Markup definition — cost-plus markup explanation.