Skip to main content
Modules / Tools / Last-time buy calculator

Last-time buy calculator

Size a last-time buy from forecast demand, failure returns, safety stock and support years, net of stock in hand, with holding cost and scrap risk.

Cost and businessFree to useHow it worksSourcesWhere it helps

Fills the inputs below with typical figures. Replace any of them with your own.

Demand

Time zero is the date of the last-time buy.

Units of this part used in production now.

Negative for a run-down, compounded each year.

From the buy date to the end of support.

Repair spares

Units already in the field and those you ship during support will fail and be repaired.

Share of failures repaired with this part.

Units taken out of service each year.

Safety stock

Chance of covering demand over the period.

Coefficient of variation of demand in a year.

Stock, process and storage

Confirmed and due before the cut-off.

Parts lost in your own build, as a share of units shipped.

Moisture, solderability or handling losses.

Used only to warn. Take it from the part's storage guidance.

Price and order rules

Storage, handling and insurance.

Discounts holding and later costs to the buy date.

The order rounds up to this.

Broker or spot price over the contract price.

Alternative: redesign or second source

Engineering, qualification and tooling.

Net buy, rounded to MOQ and pack
193,500 units
193,260 net, 240 added by rounding
Total cost of the buy, present value
$1,079,658
$812,700 purchase and $268,854 holding
Demand over support
174,849 units
162,126 production, 12,723 repair
Safety stock
18,310 units
z = 1.645 on a deviation of 11,132
Gross requirement
198,260 units
Includes 5,100 for storage loss
Left on the shelf at end of support
19,492 units
Average value held $434,942
Redesign route, present value
$890,921
Costs $188,737 less than the buy
Break-even redesign cost
$538,737
Above this the last-time buy is cheaper

Check these

  • On these figures a redesign or second source costs less than the last-time buy. Weigh risk, requalification time and what happens if demand is higher than forecast.
Demand by year and stock on the shelf
Line chart of Units against Year of support, 4 lines: Production demand, Repair demand, Total demand, Stock at year end. The same numbers are in the table under the chart.050,000100,000150,000246810Year of supportUnits
  • Production demand (solid line, circles)
  • Repair demand (dashed line, squares)
  • Total demand (dotted line, triangles)
  • Stock at year end (dash-dot line, diamonds)
Show the data as a table
Demand by year and stock on the shelf
Year of supportProduction demandRepair demandTotal demandStock at year end
120,20259120,793177,655
219,19279719,989157,515
318,23297919,211138,062
417,3211,13918,460119,275
516,4551,28017,735101,136
615,6321,40317,03583,625
714,8501,50916,36066,723
814,1081,60115,70950,413
913,4021,67915,08134,675
1012,7321,74514,47719,492
Total cost at other quantities, present value

The same forecast against a smaller or larger buy: purchase, holding and missed units, less salvage on what is left.

  • No buy, 0 units$2.58 m
  • Half, 96,750 units$1.4 m
  • Three quarters, 145,250 units$1.07 mlowest on this forecast
  • Recommended, 193,500 units$1.08 m
  • A quarter more, 242,000 units$1.39 m
  • Half as much again, 290,250 units$1.7 m
  • Double, 387,000 units$2.33 m
Show the data as a table
Total cost at other quantities, present value
ItemTotal cost (USD)
No buy, 0 units$2.58 m
Half, 96,750 units$1.4 m
Three quarters, 145,250 units$1.07 m
Recommended, 193,500 units$1.08 m
A quarter more, 242,000 units$1.39 m
Half as much again, 290,250 units$1.7 m
Double, 387,000 units$2.33 m

Sign in to save your inputs and come back to them later.

Demand by year
YearProduction (parts)Repair (parts)Total demandWith storage allowanceStock at year endHolding cost, PV
Year 120,20259120,79320,845177,655$60,000
Year 219,19279719,98920,140157,515$50,169
Year 318,23297919,21119,453138,062$40,966
Year 417,3211,13918,46018,787119,275$33,024
Year 516,4551,28017,73518,139101,136$26,190
Year 615,6321,40317,03517,51183,625$20,328
Year 714,8501,50916,36016,90166,723$15,316
Year 814,1081,60115,70916,31150,413$11,049
Year 913,4021,67915,08115,73834,675$7,431
Year 1012,7321,74514,47715,18319,492$4,380
What a too-small or too-large buy costs
BuyUnitsPurchaseHolding, PVLeft overOverstock written offUnits missedShortfall cost, PVTotal, PV
No buy0$0$00$0174,008$2,578,468$2,578,468
Half96,750$406,350$75,9450$077,258$913,341$1,395,636
Three quarters145,250$610,050$160,4120$028,758$301,686$1,072,148
Recommended193,500$812,700$268,85419,492$77,7720$0$1,079,658
A quarter more242,000$1,016,400$382,49167,992$271,2870$0$1,392,278
Half as much again290,250$1,219,050$495,543116,242$463,8040$0$1,703,286
Double387,000$1,625,400$722,232212,992$849,8370$0$2,326,914

How it works

When a supplier announces that a part will be discontinued, you can buy the parts you expect to need for the rest of the product's support life in one last order. This tool sizes that order from the demand forecast, the repair spares the installed base will draw, a safety buffer and the stock you already hold, then prices it with holding cost and tests what a too-small or too-large buy would cost against the price of a redesign.

  1. Forecast production demand. Time zero is the last-time-buy date. The profile gives the rate at each moment, and each year of the support period takes the quantity that falls inside it. A compound trend steps the rate each year; the other profiles are continuous curves that start at today's run rate. The last year is shortened if the support period is not a whole number of years.trend: year k = D x (1 + g)^(k − 1) x length; flat: D x length; linear to zero: D x (length − (b^2 − a^2) / (2 S)); exponential: D x (r^a − r^b) / (−ln r), with r = 1 − decline rate
  2. Add parts lost in your own process. A scrap or yield loss in your own build means you must consume more parts than you ship.parts consumed in production = units shipped / (1 − scrap)
  3. Add repair spares. Units in the field fail and some are repaired with this part. The field base is the installed base plus, if you choose, the units you ship during support, less a yearly retirement of old units. Each year uses the average base for that year.repair demand in a year = average field base x failure rate x repair yield x length of the year; field base = (installed base + units shipped so far + half this year's shipments) x (1 − retirement)^(mid-year)
  4. Size the safety stock. With a service level, the buffer is a normal quantile times the standard deviation of demand over the period. Each year's demand is taken to vary independently by the coefficient of variation you enter, so the period standard deviation grows with the square root of the sum of squares. With a fixed buffer, the stock is a share of the total demand.sigma = CV x sqrt(sum of (demand in year k)^2); safety stock = z x sigma, with z = the normal quantile of the service level; or safety stock = buffer % x total demand
  5. Allow for storage loss. Parts that sit in store lose some usable stock each year to moisture, solderability or handling. A part used at time t must have been bought as 1 / (1 − loss)^t parts. Safety stock is held to the end of the period.gross requirement = sum over years of (demand in year k) / (1 − loss)^(mid-year k) + safety stock / (1 − loss)^S
  6. Net, round and price the buy. Stock on hand and open orders come off the gross requirement. What is left is rounded up to the minimum order quantity and then to a multiple of the pack size.net buy = max(0, gross requirement − stock on hand − open orders); order = ceiling(max(net buy, MOQ) / pack) x pack; purchase cost = order x unit price
  7. Holding cost and present value. Existing stock is used first, so the new buy sits on the shelf until the old stock runs out. Holding cost is the yearly rate on the average value of the buy on the shelf, discounted to the buy date at the cost of capital. The purchase is paid on day one.holding cost = sum over years of (holding rate x unit price x average buy on hand x length) / (1 + discount)^(mid-year); total cost of the buy = purchase cost + present value of holding cost
  8. Test the alternative quantities. For quantities from nothing to double the recommendation the tool runs the same demand against the stock and counts what is left over and what is missing. Leftover units are written off at a salvage rate. Units that cannot be covered are bought later at a multiple of the unit price, discounted from the year they are needed.total cost at a quantity = purchase + holding PV + shortfall units x price x shortfall multiple (discounted) − leftover x price x salvage rate (discounted)
  9. Compare with a redesign. A redesign or second source costs a one-off sum and then buys the same demand, beyond the stock you hold, at the replacement price. The break-even redesign cost is the figure at which both routes cost the same.redesign route = redesign cost + PV of replacement price x units not covered by existing stock; break-even redesign cost = total cost of the buy − PV of replacement parts

Assumptions

  • Time zero is the last-time-buy date; the purchase is paid and delivered then. Open orders count as stock.
  • One part per unit shipped and per unit in the field. If a product uses several of the part, scale the demand, the installed base and the stock to parts.
  • Existing stock is used before the new buy. Safety stock is a buffer that is still on the shelf at the end of support, so it shows as leftover.
  • Storage loss is a steady percentage of the stock per year. Repair spares for units shipped during support are included only when you choose to.
  • Yearly demands vary independently by the same coefficient of variation. Real demand is often correlated, so the buffer is a minimum for a volatile product.
  • The presets are editorial figures for the product class, not data for your product.

Limits and warnings

  • Demand forecasts for discontinued parts are uncertain, and a last-time buy locks them in. Run the quantity table at demand levels you think are possible, not only the expected one.
  • Storage life depends on the package, moisture sensitivity level and how the parts are kept. Parts held longer than their rated life may need baking, re-tinning or re-qualification, which this tool does not price.
  • Tax, currency, financing terms and write-off rules are not modelled. The cost of capital is a discount rate, not a financing plan.
  • Failure rates are taken as constant. Wear-out in a long-life product pushes repair demand up late in life.
  • Other options (a buy from a franchised stockist, an aftermarket source, a pin-compatible part) change the shortfall cost; set the shortfall multiple to reflect them.

Sources

The methods and default figures rest on these public sources. The wording here is our own; read the source for its full text.

Where it helps

The lifecycle stages this tool serves: 26 stages in 23 lifecycles.

Method notev1Formula, ranges, sources and limits

Sizes the final purchase of a discontinued part from the demand forecast, repair spares, safety stock, storage loss, stock on hand and order rules, and prices the buy with holding cost and a comparison with a redesign.

Formula

trend: year k = D x (1 + g)^(k − 1) x length; flat: D x length; linear to zero: D x (length − (b^2 − a^2) / (2 S)); exponential: D x (r^a − r^b) / (−ln r), with r = 1 − decline rate; parts consumed in production = units shipped / (1 − scrap); repair demand in a year = average field base x failure rate x repair yield x length of the year; field base = (installed base + units shipped so far + half this year's shipments) x (1 − retirement)^(mid-year); sigma = CV x sqrt(sum of (demand in year k)^2); safety stock = z x sigma, with z = the normal quantile of the service level; or safety stock = buffer % x total demand; gross requirement = sum over years of (demand in year k) / (1 − loss)^(mid-year k) + safety stock / (1 − loss)^S; net buy = max(0, gross requirement − stock on hand − open orders); order = ceiling(max(net buy, MOQ) / pack) x pack; purchase cost = order x unit price; holding cost = sum over years of (holding rate x unit price x average buy on hand x length) / (1 + discount)^(mid-year); total cost of the buy = purchase cost + present value of holding cost; total cost at a quantity = purchase + holding PV + shortfall units x price x shortfall multiple (discounted) − leftover x price x salvage rate (discounted); redesign route = redesign cost + PV of replacement price x units not covered by existing stock; break-even redesign cost = total cost of the buy − PV of replacement parts

Inputs
InputUnitRange it holds forComes from
Current annual demandunits a yearfrom 0Your figure
Demand profilechoicetrend, flat, linear, exponentialYour figure
Demand trend% a year-100 to 100Your figure
Exponential decline rate% a year0 to 99Your figure
Support periodyears0 to 40Your figure
Installed baseunitsfrom 0Your figure
Annual failure or return rate% a year0 to 100Your figure
Repair yield%0 to 100Your figure
Field retirement% a year0 to 99Your figure
Include units shipped during support in the field basechoiceyes, noYour figure
Safety stock methodchoiceservice, fixedYour figure
Service level%50 to 99.99Your figure
Demand variability (coefficient of variation)% of annual demand0 to 100Your figure
Fixed buffer% of demand0 to 100Your figure
Stock on handunitsfrom 0Your figure
Open ordersunitsfrom 0Your figure
Scrap in your own process%0 to 50Your figure
Storage loss% a year0 to 5Your figure
Storage life of the partyearsfrom 0Your figure
Unit priceUSDfrom 0Your figure
Holding cost% of value a year0 to 100Your figure
Cost of capital% a year0 to 100Your figure
Minimum order quantityunitsfrom 0Your figure
Pack multipleunitsfrom 1Your figure
Salvage value of leftover stock% of price0 to 100Your figure
Cost of a missed unitmultiple of pricefrom 0Your figure
Redesign or second source costUSDfrom 0Your figure
Replacement part priceUSDfrom 0Your figure

Outputs: Demand over the support period (units); Safety stock (units); Gross requirement (units); Net buy, rounded (units); Purchase cost (USD); Total cost of the buy, present value (USD); Break-even redesign cost (USD).

Assumptions

  • Time zero is the last-time-buy date; the purchase is paid and delivered then. Open orders count as stock.
  • One part per unit shipped and per unit in the field. If a product uses several of the part, scale the demand, the installed base and the stock to parts.
  • Existing stock is used before the new buy. Safety stock is a buffer that is still on the shelf at the end of support, so it shows as leftover.
  • Storage loss is a steady percentage of the stock per year. Repair spares for units shipped during support are included only when you choose to.
  • Yearly demands vary independently by the same coefficient of variation. Real demand is often correlated, so the buffer is a minimum for a volatile product.
  • The presets are editorial figures for the product class, not data for your product.

Uncertainty: The arithmetic is exact. The result is as good as the demand forecast, which for a discontinued part is the largest uncertainty. Treat the net buy as the centre of a range and read the alternative-quantity table beside it.

Known limits

  • Demand forecasts for discontinued parts are uncertain, and a last-time buy locks them in. Run the quantity table at demand levels you think are possible, not only the expected one.
  • Storage life depends on the package, moisture sensitivity level and how the parts are kept. Parts held longer than their rated life may need baking, re-tinning or re-qualification, which this tool does not price.
  • Tax, currency, financing terms and write-off rules are not modelled. The cost of capital is a discount rate, not a financing plan.
  • Failure rates are taken as constant. Wear-out in a long-life product pushes repair demand up late in life.
  • Other options (a buy from a franchised stockist, an aftermarket source, a pin-compatible part) change the shortfall cost; set the shortfall multiple to reflect them.

Where the method comes from

The Hub's own arithmetic for sizing a lifetime buy: forecast, repair spares, a service-level safety stock, storage allowance, rounding and present value. It follows the general framing of obsolescence management in IEC 62402 and the published description of a lifetime buy, and prescribes no published formula.

Reference example, checked by test: Worked example in this method note: 10,000 units a year flat for 5 years, no installed base, 10% fixed buffer, 8,000 on hand plus 2,000 on order, MOQ 1,000 and pack 500, $2 a part, 10% holding cost, no discounting. Demand 50,000, safety 5,000, gross 55,000, net buy 45,000, purchase $90,000, holding $29,000, total $119,000. Demand over the support period 50,000; Safety stock 5,000; Gross requirement 55,000; Net buy, rounded 45,000; Purchase cost 90,000; Total cost of the buy, present value 119,000; Break-even redesign cost 39,000.

Versions

  • v1 (2026-10-25): First version, built from the tool idea.

All models in the register

Terms on this page

Safety stock
Inventory held above forecast demand to absorb variability in demand or supply.
Installed base
The equipment or products already in service with customers.
Yield
The share of manufactured units that meet specification, counted at a given step: line yield through the fab, die yield at wafer sort, and assembly and final test yield after packaging.
MOQ
The smallest quantity a supplier will accept in one order, set by wafer lot size, test setup or packaging economics.
Second source
An alternative qualified supplier of a functionally equivalent part, kept available to protect against supply interruption or price leverage.
End of support
The date after which a supplier no longer provides updates, fixes or technical support for a product, software or tool version.
HTSL
An unbiased bake, typically 1000 hours at 150 °C or above, that accelerates diffusion driven degradation such as intermetallic growth at wire bonds, stress induced voiding and data retention loss i...
MSL
A one to six classification of how long a surface mount plastic package may sit exposed to factory humidity before reflow soldering without risking moisture induced cracking or delamination.
Pin-compatible
Having the same package and pin assignment as another part, so a board designed for one can accept the other without layout changes.

The full glossary

Need help acting on this?

Tell us what you're after and leave your email: we'll connect you with the right person on the Hub.