skip to content

economics · lesson 5 of 9 · sources checked 2026-11-20

margin, price, and the cost of measurement

This lesson shows why a price above break-even can miss a margin floor, where cost leaks, and what one trial for each run costs.

status of this lesson: documented in my test system

purpose

break-even is the price at which the margin is zero. A margin floor is the lowest margin that a price must give, and a price can clear break-even and still miss it. Some runs also cost money and bring no revenue.

objectives

  1. Calculate the price that is necessary for a margin floor, from the cost of one attempt.
  2. Explain the difference between break-even and a margin floor with a worked example.
  3. Identify the runs that leak cost.
  4. Explain why one trial for each run lowers the cost but removes the knowledge that the run buys.

new terms

break-even
The price at which revenue equals cost and the margin is zero.
trial
One attempt of one configuration on one target, counted as one Bernoulli event.

how it works

A service that sells results charges a price for each attempt. The margin is the price minus the cost, divided by the price. Two prices are important:

  • The break-even price equals the cost. The margin is zero.
  • The floor price gives the margin floor. It is the cost divided by 1 minus the floor.

break-even is not a margin floor

A price above the cost clears break-even. But the margin can still be under the floor.

example The cost of one attempt is 1.00 u, where "u" is an invented unit of money. The price is 1.43 u, which is 43% above the cost. The margin is 30%. For a floor of 60%, the price must be 2.50 u.

Thus a check against break-even passes, and a check against the floor fails. Calculate the price from the floor: cost / (1 - floor). Do not check only a price that somebody configured.

the checks of the benchmark platform

The benchmark platform, my test system, has a price check. The check passed at the configured price, and the price still missed the floor. The correction calculates the price from the cost and the minimum margin. The margin alarm of the scheduler still compares with break-even, not with the floor.

example At the price of 1.43 u of the example above, an alarm against break-even stays quiet. Only a check against the floor finds that price.

one number for the price and the work

The price and the executed work must read one number. When the price counts one number of trials and the run executes a different number, the charge and the work differ.

example The price counts 10 trials. The run executes 7 effective trials, because 3 trials fail before they start. Thus the customer pays for 3 trials that did no work.

Keep the count of trials in one constant. Price on the effective trials, not on the planned trials.

runs that leak cost

Some runs cost money and bring no revenue. These three kinds of run leak cost:

  • An unbilled run: a run of a scheduled job that visits all sites, with no charge to a customer.
  • An empty run: a run that does work and returns no result.
  • A full refund: a run that the service charges, and then gives back the full charge.

example A scheduled job runs one attempt on each of 200 sites every day, and no customer pays for it. The cost is 200 attempts each day with no revenue.

Use a manual gate and a list of the permitted sites for each scheduled job with no charge.

An empty run and a full refund have one cause: the service charges before it knows the result. Reserve the worst case before the run. After the run, charge the real cost and give back the rest. The second diagram shows the four results of a run.

example A run can use 1 to 10 trials at 1.00 u each. The service reserves 10.00 u before the run. The run uses 4 trials, thus the service charges 4.00 u and gives back 6.00 u. The service does no work that nobody pays for, and the customer pays only for the work.

the cost of measurement

A trial is one attempt that a formula counts. One trial for each run looks cheap. But one trial gives almost no knowledge of the success rate.

The lower bound of the success rate shows this. With 1 success in 1 trial, the 95% lower bound of the Wilson interval is 0.21. With 10 successes in 10 trials, it is 0.72.

example The cost per success is the unit cost divided by the lower bound. At a unit cost of 1.00 u, 1 trial gives 4.8 u, and 10 trials give 1.4 u. Thus the trials buy knowledge, and the knowledge lowers the cost of each success.

Price for each attempt, but keep the count of trials that is necessary for a result.

the two sides

automation sidedetection side
A service that sells results must price failures, retries, and empty runs. A price at break-even loses money when one of them occurs.A defender can make each attempt cost more for the operator. Then the defense is the cost, not the detection.

design decisions

optiongaincostwhen it is correct
Check the price against break-evenIt is a simple test.A price can pass and still miss the floor.Only as an alarm for a loss
Calculate the price from the floorEach price gives the margin floor.The price can be higher than the market accepts.For each price that the service publishes
Charge for each effective trialThe charge agrees with the work.The customer cannot know the charge before the run.When the count of trials changes from run to run
Reserve the worst case, then charge the real costThe service never does work that nobody pays for.The customer sees a hold that is higher than the charge.For a run with an unknown count of trials
One trial for each runThe lowest cost of a runThe result gives almost no knowledge of the success rate.Only for a smoke test, not for a measurement

diagram

price check against a margin floor

The floor sets the price, and break-even only sets an alarm.source: My model of a price check against a margin floor

money flow of a metered service

Each hold ends in a charge of the real cost or in one of three full refunds.source: My model of the money flow of a metered service

code example

The code calculates the break-even price and the price for a margin floor. Then it checks each price against both of them.

example All costs and prices are synthetic, in the invented unit "u".

m02-x05-floor.tstypescript

Calculate the price that is necessary for a margin floor, and show that a price can clear break-even and still miss the floor.

// Synthetic values only. The unit "u" is an invented unit of money.
// Argument 1: the cost of one attempt. Argument 2: the margin floor (0 to 1).
// Arguments 3 and more: the prices to check.

function margin(price: number, cost: number): number {
  return (price - cost) / price;
}

function floorPrice(cost: number, floor: number): number {
  if (floor < 0 || floor >= 1) throw new Error("the floor must be 0 or more, and less than 1");
  return cost / (1 - floor);
}

const cost = Number(process.argv[2]);
const floor = Number(process.argv[3]);
const prices = process.argv.slice(4).map(Number);

console.log(`break-even price: ${cost.toFixed(2)} u`);
console.log(`price for a margin floor of ${(floor * 100).toFixed(0)}%: ${floorPrice(cost, floor).toFixed(2)} u`);
for (const p of prices) {
  const m = margin(p, cost);
  const even = p >= cost ? "clears break-even" : "under break-even";
  const ok = m >= floor ? "meets the floor" : "misses the floor";
  console.log(`price ${p.toFixed(2)} u: margin ${(m * 100).toFixed(1)}%, ${even}, ${ok}`);
}

output

The break-even price, the floor price, and one line for each price with its margin and the result of the two checks.

break-even price: 1.00 u
price for a margin floor of 60%: 2.50 u
price 0.90 u: margin -11.1%, under break-even, misses the floor
price 1.43 u: margin 30.1%, clears break-even, misses the floor
price 2.50 u: margin 60.0%, clears break-even, meets the floor

I ran the code with the Node runtime and the flag --experimental-strip-types. The arguments were the cost 1.00, the floor 0.60, and the prices 0.90, 1.43, and 2.50.

data

margin against the charge, as a multiple of break-even

status of this figure: example

margin against the charge, as a multiple of break-even0%75%break-even 0%margin floor 60%abcdefghijklm%a. 1.00 times break-evenb. 1.25 times break-evenc. 1.50 times break-evend. 1.75 times break-evene. 2.00 times break-evenf. 2.25 times break-eveng. 2.50 times break-evenh. 2.75 times break-eveni. 3.00 times break-evenj. 3.25 times break-evenk. 3.50 times break-evenl. 3.75 times break-evenm. 4.00 times break-even

source: Benchmark platform, code (my test system): margin formula, normalized to break-even; date 2026-11-16

data table
margin against the charge, as a multiple of break-even
charge, as a multiple of break-even%
1.00 times break-even0
1.25 times break-even20
1.50 times break-even33.33
1.75 times break-even42.86
2.00 times break-even50
2.25 times break-even55.56
2.50 times break-even60
2.75 times break-even63.64
3.00 times break-even66.67
3.25 times break-even69.23
3.50 times break-even71.43
3.75 times break-even73.33
4.00 times break-even75
The values are computed from the margin formula. The axis gives the charge as a multiple of break-even, thus the chart shows no absolute charge. The margin floor of 60% is at 2.5 times break-even.

example The first chart gives the margin when the charge is a multiple of break-even. At 2 times break-even, the margin is 50%. The margin floor of 60% is at 2.5 times break-even.

margin of one attempt against the ratio of price to cost

status of this figure: estimate, not measured

margin of one attempt against the ratio of price to cost94%81%56%ref 1abc%a. optimistic (16 times)b. central (5.3 times)c. pessimistic (2.3 times)ref 1: margin floor at 60% 60%

source: Benchmark platform, design (my test system): margin at three cost cases; date 2026-11-16

data table
margin of one attempt against the ratio of price to cost
cost case%
optimistic (16 times)94
central (5.3 times)81
pessimistic (2.3 times)56
By the margin floor, the price must be at least 2.5 times the cost, a margin of 60%. Only the pessimistic case, at 2.3 times, is under the margin floor.

estimate, not measured The second chart gives the margin of one attempt of the benchmark platform at three cost cases. Only the pessimistic case is under the margin floor. Thus a price that is safe at the central cost can miss the floor when the cost rises.

failure modes

problemcausecorrection
A price check passes, and the margin is under the floor.The check uses the configured price, or it compares with break-even.Calculate the price from cost / (1 - floor).
The charge differs from the work.The price and the run read different counts of trials.Keep the count in one constant. Price on the effective trials.
A scheduled job runs with no charge against many sites.Nothing stops a scheduled job that has no customer.Use a manual gate and a list of the permitted sites.
Empty runs make the cost of each result higher than the price.The runs do work and return no result, and the price does not include them.Count the empty runs, and include their cost in the cost of each success.
A cheap run gives no usable success rate.The run has one trial.Price for each attempt, but keep the count of trials that is necessary for a result.
Refunds remove the margin.The service charges before it knows the result.Reserve the worst case. After the run, charge the real cost and give back the rest. The second diagram shows the four results of a run.

check questions

  1. The cost of one attempt is 2.00 u, and the margin floor is 50%. Which price gives the margin floor?

    1. 2.00 u
    2. 3.00 u
    3. 4.00 u
    4. 5.00 u
    answer

    c. 4.00 u

    The floor price is the cost divided by 1 minus the floor: 2.00 / 0.50 = 4.00 u.

  2. Explain the difference between break-even and a margin floor. Use the cost 1.00 u and the price 1.43 u.

    sample answer

    Break-even is the price at which the margin is zero, here 1.00 u. The price 1.43 u clears break-even, but its margin is only 30%. For a margin floor of 60%, the price must be 2.50 u. Thus a check against break-even passes, and a check against the floor fails.

  3. Which run leaks cost?

    1. A run that the customer pays for, with a result
    2. A run of a scheduled job with no charge to a customer
    3. A run that the service does not start
    answer

    b. A run of a scheduled job with no charge to a customer

    An unbilled run costs money and brings no revenue. Empty runs and full refunds also leak cost.

  4. Explain why one trial for each run does not give a low cost per success.

    sample answer

    One trial gives almost no knowledge of the success rate. With 1 success in 1 trial, the lower bound of the success rate is 0.21. The cost per success is the unit cost divided by the lower bound, thus it is high. More trials raise the lower bound and lower the cost of each success.

exercise

exercise Do this task in your own lab, with synthetic values only.

  1. Save the code example in an empty folder of your lab.
  2. Run it with Node and the flag --experimental-strip-types.
  3. Use the cost 0.40, the floor 0.50, and the prices 0.60, 0.80, and 1.00.
  4. Record the margin of each price.
  5. Write which prices clear break-even and which prices meet the floor.
sample answer

The answer uses the synthetic values only.

The break-even price is 0.40 u, and the floor price is 0.80 u. The price 0.60 u gives a margin of 33.3%. It clears break-even and misses the floor. The price 0.80 u gives 50.0% and meets the floor. The price 1.00 u gives 60.0% and meets the floor.

Thus all three prices clear break-even, but only two prices meet the floor.

sources

  1. My model of break-even, the margin floor, and the cost of measurement, 2026-11 (not public).
  2. Benchmark platform, design (my test system): the price check, the margin alarm of the scheduler, and the count of trials, 2026-11 (not public).