Fixed and variable costs: specify the decision horizon
Separate shared allocation from avoidable spending and use local cost models only within an explicit capacity range.
On this page
The question for today
What you’ll understand
- Classify a cost relative to a stated horizon and decision.
- Distinguish average allocated cost from incremental avoidable cost.
- Identify capacity steps that invalidate a constant variable rate.
A shared inference platform can become cheaper per request while its total spending increases. That is ordinary arithmetic when fixed capacity is spread across more useful work. It does not imply that every extra request is free, or that removing a tenant saves its allocated share. All prices here are explicitly fictional stable teaching inputs in fictional credits, FC. We use a local engineering cost model over a stated horizon and feasible capacity range. Its purpose is to expose assumptions behind an operational comparison, rather than prescribe a purchase or describe any vendor contract.
Fixed means fixed relative to a particular decision
A resource already committed for this week can be fixed for a decision about one additional request, while the same resource is avoidable in a decision about next quarter. An operator salary, a minimum service fee, and a reserved allocation have different cancellation and renewal boundaries. Record the horizon and the alternative action before classifying them. A charge may also be sunk for the current decision: allocating it to teams can help accountability without making it recoverable when their workload disappears.
Shared services add a second distinction between causal cost and an allocation convention. A team can receive ten percent of an observability pool because it has ten percent of an agreed usage weight. Removing that team need not reduce the pool bill by ten percent if capacity remains provisioned. Conversely, a small load reduction can cross a capacity step and avoid an entire replica. Publish the allocation policy separately from the engineering prediction of what changes under the proposed action; both can be useful without being the same number.
Average and marginal cost answer different questions
Average cost distributes the whole chosen numerator across the selected denominator. It can support chargeback or comparison of complete deployments, provided failures and shared overhead are handled consistently. Incremental cost asks what additional spending the decision causes. In the local linear model that increment is the variable rate times extra work, while the fixed term remains. Do not multiply an average including fixed overhead by added requests and call the result an avoidable marginal bill; that charges the same fixed pool again.
A constant variable rate is itself an approximation. An extra workload can require another replica, a larger database tier, more checkpoint storage, or an additional network path. It can also alter cache reuse, batching, and incident burden. Describe a piecewise model or explicitly mark the operating range instead of extrapolating one slope indefinitely. Account for setup and shutdown costs when changing configurations, and include capacity or latency constraints that make a mathematically cheap operating point infeasible for the required service.
Measure which term an optimization can change
Build the comparison from resource lifetimes, operation counts, and shared pools, then state which terms actually change. A faster kernel may reduce an allocated-time charge, improve latency while leaving a committed pool unchanged, or create room for more traffic without reducing this period’s spending. These are distinct outcomes. Reconcile the predicted change with the accounting boundary and evaluate the whole service. A smaller average cost achieved by dropping difficult requests is not a valid efficiency improvement under a fixed successful-work requirement.
The function lab illustrates a warning about nonconstant marginal change. Reset, explicitly set a=0.5 and x=1, predict the slope, then Play or Step. In a separate fresh Reset set a=0.5 and x=2; slopes are one and two. This quadratic toy is deliberately different from our linear cost model: its changing derivative shows why a locally estimated slope need not transfer to another operating point. It contains no cost ledger, capacity step, procurement policy, or service-quality constraint. Use actual measurements to decide whether a real variable rate remains approximately constant.
Work it through
Spreading a fictional fixed pool
For one week assume a fictional fixed pool F=600 FC and variable rate v=0.02 FC/task, with both workloads feasible on unchanged capacity. Compare 10,000 and 20,000 completed tasks.
At 10,000 tasks the variable term is 200 FC and total cost is 800 FC. Dividing by 10,000 gives average cost 0.08 FC/task, including the fixed pool.
At 20,000 tasks the variable term is 400 FC and total cost is 1,000 FC. The average is 0.05 FC/task. Total cost rose by 200 FC even though average cost fell.
The extra 10,000 tasks caused 200 FC in this local model, or 0.02 FC per added task. Using the later average 0.05 would assign 500 FC to that increment and incorrectly reallocate part of the existing fixed pool as new spending.
The average falls from 0.08 to 0.05 FC/task while the modeled incremental rate remains 0.02 FC/task over this capacity range.
The living notebook
Explore the model
Interactive lab · function
A slope may change outside a local operating point
Use independent Reset → explicitly set BOTH a and x → predict → Play/Step runs for (0.5,1) and (0.5,2). Slopes are one and two for the quadratic toy, unlike a constant-v linear cost model. No actual cost or capacity is simulated.
- y at chosen x
- 0.608
- Tangent slope · 2ax
- 1.35
- Signed area · ax³/3
- 0.182
This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forValidate the operating range before extrapolating a marginal estimate.
Pause & reason
Check your understanding
Your turn
Try it yourself
Use a fictional weekly F=300 FC and v=0.05 FC/task. Calculate total and average cost for 3,000 tasks, then the extra cost of 1,000 more tasks if capacity stays unchanged.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Compute the complete first workload, then subtract totals under the same fixed term.
Compare with the solution
The first workload costs 300+0.05×3000=450 FC, averaging 0.15 FC/task. At 4,000 tasks the total is 500 FC, so the increment is fifty FC, or 0.05 FC per extra task. The first average includes the fixed pool and is not the marginal rate. If the fourth thousand tasks require a new replica or violate latency limits, replace the local model with the actual capacity transition before using this prediction.
Keep the idea
Take it with you
- Classify fixed and avoidable costs relative to a decision horizon.
- Separate allocation conventions from causal spending changes.
- Treat constant variable rates as local models with capacity limits.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.