How the math works
Markup and margin describe the same dollars of gross profit, measured against different things. Markup is profit divided by cost. Margin is profit divided by price. Because price is always bigger than cost on a profitable job, the same profit is a smaller percentage of the price, so margin always reads lower than markup.
To price a job, the calculator adds materials, labor and other direct costs, then divides by one minus your target margin. If you want to keep 40%, cost can only be 60% of the price, so a $4,500 job has to sell for $4,500 ÷ 0.6 = $7,500. That is a 66.7% markup, not 40%. To check a price you already charge, it subtracts cost from price and divides the difference by each base in turn.
The table under the calculator is worked out from those same two formulas: markup equals margin ÷ (100 − margin), and margin equals markup ÷ (100 + markup), both as percentages.
The mistake the table exists to prevent
The common one is marking cost up by the margin you want. An owner who needs a 40% margin adds 40% to cost and ends up at 28.6%. On a single job the difference looks small. Across a year of jobs it can be the whole of the profit, and it is invisible until the accountant's numbers arrive, because every individual estimate looked right.
The other is counting labor at the billing rate. If you bill $120 an hour for a tech who costs you $55 loaded, the $65 difference is profit, not cost. Put it in the cost column and the margin looks healthy while the job barely clears.
What to do with the number
Work out the margin your overhead needs first: a year of overhead divided by a year of revenue is the floor, and your target margin sits above it. Then check your last few jobs with the second mode. If the margins you actually earned are below the floor, the problem is in pricing or estimating, and more leads will only make it bigger.
Watch discounts the same way. Every dollar off comes straight out of gross profit, so it costs a bigger share of margin than it sounds: take 10% off a price that carried a 40% margin and the job keeps 33.3%. Run the discounted price through the second mode before you agree to it.
Pricing that quietly misses its margin is one of the leaks our revenue leak remediation work looks for, alongside estimates that never get followed up. For the longer version of this page, read the markup versus margin mistake.