Presets
Playback
The investment
What the company pays and what it can sell at the end.
Sales and costs
Revenue, margin, tax and uncertainty.
Cost of capital
Debt and equity funding set the discount rate.
Time
Move through the years or let it play.
Layers
Model checks
The science
The question
A company can spend money today on a factory that will earn cash for years. Is it worth it? Capital budgeting answers with the time value of money: a dollar in ten years is worth less than a dollar now, and a risky dollar is worth less than a safe one. This lab values one project. At year 0 the company pays the capital expenditure (capex). In each year 1 to N the factory sells goods, pays costs, pays tax and ties up working capital, and at the end it is sold for scrap value. All the free cash flows are discounted at the cost of capital, and the sum is the net present value (NPV). Accept the project if NPV is above zero.
Free cash flow
Revenue grows at a steady rate g from the year-1 level R1: R_t = R1 (1+g)^(t-1). The operating profit before depreciation is m R_t. Depreciation is straight-line, D = capex / N, and it is a tax shield because tax is paid on profit after depreciation. So FCF_t = (m R_t - D)(1 - tax) + D - change in working capital. Working capital is a fixed share of revenue and is released at the end, when the plant is also sold for a fraction of capex (book value zero, so the sale is fully taxed).
Cost of capital (WACC)
Investors in the business bear the asset risk, measured by the unlevered beta. When part of the funding is debt, equity holders carry extra financial risk, so their beta is relevered with the Hamada formula beta_L = beta_U (1 + (1 - tax) D/E). The Capital Asset Pricing Model gives the cost of equity r_E = r_f + beta_L x ERP. Interest is tax-deductible, so debt costs r_D (1 - tax) after tax. The discount rate is the weighted average, WACC = (E/V) r_E + (D/V) r_D (1 - tax). More debt lowers the WACC through the tax shield (if the debt costs the risk-free rate, exactly WACC = r_u (1 - tax D/V), check 3), but this model keeps the debt rate, the asset beta and the debt share separate, so it does not include financial distress costs, which in real life stop the debt share from rising for ever.
Decision measures
- NPV = sum of FCF_t / (1 + WACC)^t, in money of today. This is the value created for the owners.
- IRR is the rate that makes the NPV zero. The project is acceptable when the IRR exceeds the WACC. With one outflow followed by inflows the NPV and IRR rules agree; with sign changes in the middle there can be several IRRs and the IRR rule fails.
- Payback is the time to recover the capex from undiscounted cash flows. Discounted payback does the same after discounting. Both ignore cash after the payback point.
- Profitability index = PV of the inflows / capex = 1 + NPV/capex.
Uncertainty
Demand is never known. The simulator draws 4,000 futures in which each year revenue is multiplied by an independent lognormal factor with mean 1 and the chosen volatility, and recomputes the NPV each time. The histogram shows the chance of a negative NPV. The tornado chart shows how much the NPV moves if each input is wrong by 20 % (50 % for growth and working capital), so you can see which assumption matters most.
Simplifications to keep in mind
- One project, annual steps, cash flows at year end. No inflation split between real and nominal flows.
- The discount rate is constant over the life. The same WACC is used even if the project is riskier or safer than the company; a better method adjusts for the project's own risk.
- Taxes are linear: a loss earns an immediate tax refund. Real systems have loss carry-forwards.
- Demand shocks are independent between years. Real demand shocks persist, which would widen the spread of NPV.
- No option value: the model does not let the company abandon, expand or delay, which is why the NPV rule can undervalue flexible projects.
- Financing is a fixed D/V; the interest rate and the equity beta do not depend on how much debt there is beyond the Hamada relevering. No default risk or distress cost.
- All numbers are illustrative round values, not a forecast for any company.
Independent checks
Five checks run live: (1) the IRR solved by bisection and by Newton-Raphson agrees, the NPV at the IRR is zero, and a single-payoff case equals its closed form; (2) the year-by-year engine equals the closed-form growing annuity plus the depreciation tax shield; (3) the WACC obeys the Modigliani-Miller relations after Hamada relevering; (4) the Monte Carlo mean and standard deviation agree with the exact values, since NPV is linear in the revenue shocks; (5) payback interpolation, profitability index and the NPV versus IRR decision rule are mutually consistent.
What to try
- Press Play: the columns of cash flow grow one year at a time while the coin stack of capex turns green as the discounted cash repays it.
- Load Overpaid: capex too high: NPV turns negative, the gauge sinks below zero and the IRR falls below the WACC.
- Load Cheap debt, big tax shield and compare the WACC with the base case; then raise the debt share to 80 % and watch the levered beta climb.
- Load Risky start-up product: a high expected growth but a high beta and 40 % volatility. Look at how wide the Monte Carlo histogram becomes.
- Raise the risk-free rate and see the NPV profile cross zero earlier: the project can be good at 4 % and bad at 8 %.