To compute discounted cash flow in Excel, lay out one row of forecast periods, one row of cash flows, one discount rate cell, and a present value row that divides each cash flow by (1 + rate) raised to its period number. Sum that row for the DCF; add a terminal value discounted the same way for an enterprise or project valuation. The single condition that breaks most spreadsheets: Excel's NPV function assumes the first value arrives one period after today, so a time-zero cash flow must sit outside the function or be handled separately.
That distinction between discounting individual cash flows and calling a built-in function matters more than any formatting choice. Once you see the mechanics, DCF stops being a black box and becomes arithmetic you can audit line by line. The walkthrough below builds a working model, checks it against Excel's NPV function, handles mid-year timing and terminal value, and then stress-tests the answer.
Set up the model skeleton before touching a formula
A DCF in Excel lives or dies on its row structure. Before you type a single formula, reserve a clean block where every row has one job. Prerequisites: a list of forecast periods, expected cash flows for each, and one assumed discount rate that reflects the risk and time value of money. You don't need the "right" rate to start; you need a rate in a cell so it can be changed and audited.
A workable layout, using columns B through H for years:
Row 1: period numbers 0, 1, 2, 3, 4, 5, with the year-0 column reserved for today's outlay. Row 2: labels such as "Year." Row 3: net cash flow for each period, negative for outflows and positive for inflows. A single input cell, say B8, holding the discount rate as a decimal (0.10 for 10%). Row 4: discount factor for each period. Row 5: present value of each period's cash flow.
Keep inputs (rate, cash flows) visually separate from calculations (factors, present values). This is the reversible core of the model: change one input and every downstream cell updates. Everything else in this guide is an addition to this skeleton.
Get the discounting mechanic right first
Discounted cash flow answers one question: what is a future dollar worth today? If money earns a return of r per period, then a cash flow CF arriving n periods from now is worth CF divided by (1 + r) to the power n. That's it. Excel just automates the repeated division.
Take a simple example to see the arithmetic plainly. Suppose r = 10%, and you expect $1,000 in one year, $1,000 in two years, and $1,000 in three years. The factors are:
Year 1: 1 / (1.10)^1 = 0.9091, present value $909.09 Year 2: 1 / (1.10)^2 = 0.8264, present value $826.45 Year 3: 1 / (1.10)^3 = 0.7513, present value $751.31
Sum: $2,486.85. That's the discounted value of the three inflows. Now add a $2,000 outlay today (period 0). The net present value is $2,486.85 − $2,000 = $486.85. A positive NPV means the investment clears the 10% hurdle; a negative NPV means it doesn't.
In Excel, with the rate in B8 and cash flows in B3 through E3, the present value row could read =B3/(1+$B$8)^B$1, dragged across. The absolute references on the rate and the period number let you fill the formula right without rewriting it. Expected result: each period's cash flow scaled down by its own factor. Check: the year-1 factor for a 10% rate should display as roughly 0.909.
The NPV function trap and how to avoid it
Excel's NPV function does the discounting for you, but with a timing convention that trips up nearly everyone. Per Microsoft's documentation, NPV(rate, value1, [value2], ...) interprets the values argument as a stream occurring at the end of each period, beginning one period after today. The function's result therefore effectively discounts the first value by one full period.
That means if your cash flow range includes a time-zero outlay, wrapping the whole range inside NPV understates or misstates the answer. Microsoft's own guidance is explicit: if the first cash flow occurs at the beginning of the first period, add that first value to the NPV result rather than including it in the values arguments.
Two correct patterns follow:
Split the outlay: =B3 + NPV(B8, C3:E3), where B3 is the period-0 cash flow entered directly and C3:E3 are the year 1 through 3 flows. This treats the outlay as a today-dollar amount and discounts only future cash flows. Discount everything manually: =SUMPRODUCT(C3:E3/(1+B8)^(C1:E1)) plus the period-0 cell, which makes the timing explicit and auditable.
The trap has a second form: using NPV on a range that starts with a year-1 flow but labeling the output as if it were the full DCF including initial cost. The number will look plausible and be wrong by the size of the initial investment. The fix is to decide once whether your model treats period 0 separately, then structure every formula around that decision.
A quick cross-check against the simple example: =NPV(0.1, 1000, 1000, 1000) returns $2,486.85, matching the hand calculation above, because all three flows are future. Add + (-2000) outside the function and you get $486.85. If your result doesn't match a hand-built sum when you test it, the timing convention is almost always the culprit.
Build the present value row and the gross DCF
Once the skeleton exists, the present value row is where the model earns its keep. For each forecast period, compute cash flow times the discount factor. Then sum the row for the gross discounted cash flow, meaning the value of all forecast-period cash flows before counting today's outlay.
That gross figure is useful on its own. It answers "what is the operating stream worth today?" separately from "is the upfront cost worth paying?" Analysts sometimes call the gross sum the discounted cash flow and reserve net present value for the number after subtracting the initial investment. Keep the labels consistent, because the two numbers differ by exactly the upfront outlay and mixing them up in a memo creates expensive confusion.
A practical check: if the gross discounted value is $2,486.85 and the outlay is $2,000, the net is $486.85, and the model should show both rows. If someone asks "what's the DCF here?" they usually want the net number, so label your output cells accordingly.
One more check worth building in: reconcile the manual present value row against the NPV function on the same future flows. They should agree to the cent. If they don't, one of the two is using an inconsistent period alignment.
Handle mid-year cash flows without breaking the math
Annual end-of-year discounting is a simplifying fiction. Real projects collect cash throughout the year, and analysts often discount as if all cash arrives mid-year, using an exponent of n − 0.5 instead of n. This raises present values slightly, because the money arrives sooner.
In Excel, the manual approach adapts cleanly: =C3/(1+B8)^(C1-0.5) for a mid-year convention on period 1, and so on. The NPV function cannot express this convention, which is one reason serious models build the factor row explicitly rather than leaning on the shortcut function.
The rule of thumb: use the function for quick checks and textbook end-of-period work, use the manual row when timing matters. Document which convention you chose in a labeled cell, because a reviewer comparing two models can otherwise miss a half-year difference that explains a real gap in value.
If cash flows are quarterly or monthly instead of annual, change both the period numbers and the rate together. The rate must be per period: a 10% annual rate is not 10% per quarter. Convert with (1 + annual rate)^(1/4) − 1 for the equivalent quarterly rate, or align everything at an annual level. Mixing an annual rate with quarterly periods produces a number that looks precise and means nothing.
Terminal value: the largest and most fragile number
A DCF forecast usually stops after five or ten years, but the business or project doesn't stop there. Terminal value captures everything after the forecast window. It's often the largest single line in the valuation and the easiest to get wrong.
The standard method is the Gordon growth formula: terminal value equals the final-year cash flow times (1 + g), divided by (r − g), where g is a perpetuity growth rate and r is the discount rate. It assumes the final-year flow grows at g forever. With a final-year flow of $500, r = 10%, and g = 2%, terminal value = 500 × 1.02 / (0.10 − 0.02) = $6,375.
In Excel that's a single cell, then discount it back by the forecast length: =TV_cell/(1+B8)^5 if the forecast covers five periods. Add the discounted terminal value to the discounted forecast flows.
Two structural limits deserve respect. First, g must stay below r or the formula divides by zero or a negative number; Excel will happily produce an absurd or error value if you push it. Second, terminal value can dominate the output. If it contributes 80% of your DCF, the model is really a growth-perpetuity assumption in disguise, and small changes to g swing the entire answer. Show the terminal value as a share of total value on your sheet so the sensitivity is visible, not buried.
An alternative terminal method, using an exit multiple of earnings or cash flow, avoids the perpetuity formula but imports its own assumption. Neither method is more truthful; both demand a sanity check against what comparable assets actually sell for.
A worked example with reproducible numbers
Put the pieces together with a five-year project. The discount rate is 10%. Initial outlay at year 0: $10,000. Forecast cash flows: $3,000, year 1; $3,500, year 2; $4,000, year 3; $4,500, year 4; $5,000, year 5. Terminal growth after year 5: 2%.
Discount factors at 10%: 0.9091, 0.8264, 0.7513, 0.6830, 0.6209. Present values: $2,727.27, $2,892.56, $3,005.26, $3,073.49, $3,104.61. Sum of forecast present values: $14,803.19.
Terminal value at year 5 = $5,000 × 1.02 / (0.10 − 0.02) = $63,750. Discounted: $63,750 × 0.6209 = $39,583.13.
Total discounted value = $14,803.19 + $39,583.13 = $54,386.32. Net of the $10,000 outlay: $44,386.32.
These are illustrative inputs, not a market estimate, but they are arithmetically reproducible: every figure above comes from the formula in this article. Run the same numbers in Excel with the layout described, and the outputs should match to the cent. That's your acceptance test for the model.
Notice how large the terminal value is: about 73% of the total discounted value. That's the fragility flagged earlier, and the reason a worked example should always show the components rather than just the final number.
Cross-check with IRR and payback
Excel's IRR function solves for the rate at which NPV equals zero: it returns the discount rate that makes the time-zero outlay and all discounted future flows cancel. For the worked example, feed the full stream including the −$10,000 at period 0 into IRR and compare the result to your 10% hurdle. A project IRR above the hurdle is consistent with a positive NPV; the two methods should tell the same story.
Use IRR as a consistency check, not as a replacement. IRR doesn't need a discount rate input, which is its attraction and its hazard: it answers a different question than NPV, and for unusual cash flow patterns (multiple sign changes) it can return multiple or misleading answers. Payback period, similarly, ignores the time value of money entirely but is useful for communicating liquidity risk.
The three metrics together give a fuller picture: NPV says whether value is created at your required return, IRR says what return the project earns, and payback says how long the money is at risk.
Where models break and what to check
Most DCF spreadsheets fail for mundane reasons, not conceptual ones. Run through these failure modes before trusting an output.
Sign errors: outflows entered as positive numbers inflate the result. Make the period-0 figure negative and keep the convention throughout. Rate as a percentage typed as a whole number: entering 10 instead of 0.10 makes the factor astronomically small. Format the input cell as a percentage and confirm the underlying value. Mixed timing conventions: period 0 counted inside NPV, or mid-year discounting applied to some rows but not others. Terminal value not discounted: a common and dramatic error, since it inflates the total by the full undiscounted amount. Unequal spacing: the NPV function assumes equally spaced periods. Irregular cash flows need manual exponents tied to actual dates, not period numbers. Circular references from debt or interest modeled as a percentage of the balance. If a linked debt schedule creates circularity, that's the stopping point: resolving it usually requires an iterative calculation setting or restructuring, and if the workbook belongs to a financing or audit workflow, it needs review by a qualified financial professional before decisions are made on it.
A final check worth adopting: rebuild one period's present value by hand from the formula and compare it to the spreadsheet. If the manual arithmetic and the model disagree, the model is wrong until proven otherwise.
FAQ
Does Excel's NPV function include the initial investment?
No. It discounts the values you give it as end-of-period flows starting one period out. Enter the initial outlay separately and add it to the NPV result, or leave it out for a gross discounted value.
How do I discount a cash flow that arrives in six months?
Use an exponent of 0.5 in the factor: cash flow divided by (1 + annual rate)^0.5. The manual factor row supports this; the NPV function does not.
What discount rate should I use?
The rate should reflect the required return for the risk of the cash flows, often a cost of capital for a business or a hurdle rate for a project. Choosing it is a judgment call with real consequences, and for a valuation used in a financing or investment decision, a qualified financial professional should review the assumption.
The material above is general education in spreadsheet mechanics, not individual investment, tax, or legal advice.