Recovering two terms of a linear cost model
If 10 units cost 150 and 20 units cost 200, and the same two-term model applies to both, the variable rate is 5 per unit and the fixed total is 100.
Two records, two unknowns
The cost calculator uses the model cost = quantity × variable cost + fixed cost. It has two unknowns, the variable cost per unit and the fixed total. One record of quantity and cost cannot separate them, because many pairs fit one point. Two records at different quantities can, provided the same rate and the same fixed total apply to both. This page works backward from two hypothetical records, 10 units costing 150 and 20 units costing 200, and uses the basic calculator and the cost calculator to recover and verify the two terms. The approach is a small piece of algebra that analysts use when a vendor quotes two prices for two volumes and you want to know the setup charge hidden inside them.
Subtract the records first
Subtracting the lower cost from the higher one removes the fixed total, since both records contain it once. Here 200 - 150 = 50. That 50 is the cost of the additional units alone, with nothing fixed left in it. The quantity difference is 20 - 10 = 10 units. The subtraction works for any pair of distinct quantities, and it is the step that makes the two-record problem solvable at all. If the quantities were equal, the difference would be zero and no rate could be found. Nearly equal quantities are a weaker case, since a small rounding difference in either cost then produces a large swing in the rate you calculate.
The variable rate
Divide the cost difference by the quantity difference: 50 / 10 = 5. The extra 10 units added 50 to the cost, so each unit added 5. This is the slope of the line through the two records, and it is the variable cost per unit under the model. In accounting language it is the marginal cost per unit within the range between the two quantities. The basic calculator handles both the subtraction and the division, as the first two cases below show. The units of the rate are cost per unit of quantity, so a cost in dollars and a quantity in cartons gives a rate in dollars per carton.
The fixed total
Now put the rate back into either record. At 10 units, the variable part is 10 × 5 = 50, and the total is 150, so the fixed total is 150 - 50 = 100. At 20 units, the variable part is 100 and 200 - 100 = 100 again. Both records give the same fixed total, which is what we expect, since the rate came from them. If the two fixed totals differed, the arithmetic would contain a slip. This consistency check is automatic when the rate was found from the same two records. The fixed total is also the cost at a quantity of zero, which is where the fitted line meets the cost axis, though a real process may not run at that point.
Checking with the cost calculator
The cost calculator confirms the recovered terms. With quantity 10, variable cost 5 and fixed cost 100, the cost is 150.00. With quantity 20, it is 200.00. Both records are reproduced, so the pair of terms fits the data exactly. Running the check protects against arithmetic slips in the subtraction and the division, and it also confirms that the model form used in the calculator matches the form assumed in the derivation. If the check fails for a pair of real records, the usual cause is a transcription error in one of the four numbers.
A second pair of records
Suppose 4 units cost 70 and 12 units cost 150. The cost difference is 80 and the quantity difference is 8, so the variable rate is 10. The variable part of the first record is 4 × 10 = 40, which leaves a fixed total of 30. Check the second record: 12 × 10 + 30 = 150. The terms are different from the first example, but the method is the same. These records are hypothetical and chosen to give whole numbers. Real quotes seldom do, so expect decimals in the rate and keep extra digits until the fixed total is found, then round the final figures.
Two points always fit a line
Two records determine a line, and there is no way to test from them alone whether the line is the right model. Real costs may step up when a new machine or shift is needed, may fall with volume discounts or may include items that are neither fixed nor proportional to quantity. A third record that lies on the same line supports the model, and one that does not shows that the linear form fails somewhere. The recovered terms are parameters of a fitted line, not measurements of any particular expense. When a set of several records is available, a least-squares line is the usual way to fit them, and the two-record method is the simplest case of that idea.
Using the terms responsibly
The recovered variable rate and fixed total apply within the range of the two records and perhaps a little beyond. Extending the line far outside that range, say to 1,000 units, assumes the same structure holds. The terms are model parameters, not an accounting classification, and they should not be used to label an actual expense as fixed or variable without looking at the underlying records. Collect more data before interpreting a real cost process. A negative fixed total or a negative rate from real records is a sign that the model does not fit, since neither has a sensible meaning in this form.
Errors when combining two model totals
Using a difference of the costs but a sum of the quantities gives a wrong rate. Dividing by one of the quantities, not their difference, mixes in the fixed term. Records in different currencies, periods or scopes cannot be combined. A quantity measured in one unit and a cost for another unit also breaks the model. Check that the two records describe the same product, the same period and the same scope before subtracting them. Reversing the order of both differences leaves the rate unchanged, since the two minus signs cancel, but reversing only one of them gives a rate with the wrong sign. Subtract in the same order in the numerator and the denominator, and label the records first and second.
Reproduce the checks
Cost difference
Open the Basic calculator and enter:
- First number
200- Operation
subtract- Second number
150
Expected output:
Result
50Subtracting removes the common fixed term.
Recovered variable rate
Open the Basic calculator and enter:
- First number
50- Operation
divide- Second number
10
Expected output:
Result
5Divide by the quantity difference.
First-record check
Open the Cost Calculator and enter:
- Units sold
10- Variable cost per unit
5- Fixed costs in same period
100
Expected output:
Total cost
150.00The recovered terms reproduce the first record.
Second-record check
Open the Cost Calculator and enter:
- Units sold
20- Variable cost per unit
5- Fixed costs in same period
100
Expected output:
Total cost
200.00They also reproduce the second record.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- OpenStax formula reference ↗ · 2026-10-08