Calculating WACC in Excel for DCF Valuation

Tested prompts for how to calculate wacc in excel compared across 5 leading AI models.

BEST BY JUDGE SCORE Claude Opus 4.7 10/10

If you're building a DCF and need a discount rate, WACC is the number that makes or breaks your valuation. The formula is simple on paper: WACC = (E/V) × Re + (D/V) × Rd × (1 − T). Getting it right in Excel is harder because each input (cost of equity, cost of debt, capital weights, tax rate) comes from a different source and needs consistent assumptions.

This page shows you how to structure a WACC calculation in Excel that a reviewer can actually audit. You'll see the exact layout, the CAPM build for cost of equity, how to pull market values for weights instead of book values, and how to sanity check the output against comparable companies.

The AI prompt and model outputs below generate a ready-to-paste Excel structure with labeled inputs, formulas, and a sensitivity table. Use it as a starting template, then swap in your target company's data.

When to use this

Use an Excel-based WACC when you need a transparent, auditable discount rate for a DCF or LBO model, or when your team needs to stress-test assumptions across beta, risk-free rate, and capital structure. Excel is the right tool when the valuation will be reviewed by another analyst, shared with a committee, or revised over multiple versions.

  • Building a DCF valuation for a public or private company
  • Running a fairness opinion or transaction model where every input must be traceable
  • Creating a sensitivity table showing enterprise value across WACC and terminal growth
  • Benchmarking a target's WACC against a comps set with different capital structures
  • Teaching or training junior analysts on the CAPM and WACC mechanics

When this format breaks down

  • Valuing early-stage startups with no debt and unstable betas (use venture-style discount rates instead)
  • Quick back-of-envelope checks where a rough 8-10% cost of capital is sufficient
  • Project-level IRR hurdles where the project risk differs materially from the firm's overall risk
  • Distressed or highly levered companies where CAPM assumptions break down and an APV approach is cleaner

The prompt we tested

You are a financial modeling expert specializing in corporate valuation and Excel-based DCF models. Your task is to provide a clear, step-by-step guide for calculating the Weighted Average Cost of Capital (WACC) in Excel based on the user's specific company data or scenario.

Instructions: Format the response as a numbered step-by-step guide with clear section headers. For each step, show the exact Excel formula in monospace (e.g., =B5+B6*(B7-B5)) and specify suggested cell references (like B2, B3). Keep explanations concise but include a brief note on where to source each input (e.g., 10-year Treasury for risk-free rate). End with a small sample output table showing typical values.

User's company data / scenario:
I'm building a DCF for Microsoft. Market cap is $3.1T, total debt is $97B, beta is 0.91, the 10-year Treasury yield is 4.3%, equity risk premium is 5.5%, pre-tax cost of debt is 4.8%, and the effective tax rate is 18%. Walk me through setting up the WACC calculation in Excel.

Provide a complete walkthrough that includes: (1) setting up the input assumptions in labeled cells, (2) calculating the cost of equity using CAPM with exact Excel formulas, (3) calculating the after-tax cost of debt with formulas, (4) computing the capital structure weights, (5) the final WACC formula in Excel, and (6) a sanity check on the result.

Model comparison

ModelQualityCostLatencyTokens
Claude Opus 4.7 10 $0.1256 18.6s 497 / 1575
Claude Haiku 4.5 9 $0.0106 13.5s 359 / 2048
GPT-5.4Not run yet
Gemini 2.5 Pro 9 $0.0020 15.6s 345 / 319
Grok 4.1 Fast Reasoning 9 $0.0005 11.3s 473 / 767

Outputs

Claude Opus 4.7 10/10
# WACC Calculation for Microsoft in Excel: Step-by-Step Guide

## Step 1: Set Up Input Assumptions in Labeled Cells

Create a clean input block in **Column A (labels)** and **Column B (values)**. Source notes are provided for each input.

| Cell | Label | Value | Source |
|------|-------|-------|--------|
| A2 | Market Cap (E) | 3,100,000 | Yahoo Finance / Bloomberg (in $M) |
| A3 | Total Debt (D) | 97,000 | Latest 10-Q balance sheet (ST + LT debt) |
| A4 | Beta (β) | 0.91 | Bloomberg / Yahoo Finance (5Y monthly) |
| A5 | Risk-Free Rate (Rf) | 4.30% | 10-Year US Treasury yield (treasury.gov) |
| A6 | Equity Risk Premium (ERP) | 5.50% | Damodaran ERP estimates |
| A7 | Pre-Tax Cost of Debt (Kd) | 4.80% | YTM on MSFT bonds / interest expense ÷ debt |
| A8 | Effective Tax Rate (t) | 18.00% | 10-K income statement |

**Tip:** Format B5:B8 as percentages and B2:B3 as numbers with commas.

---

## Step 2: Calculate the Cost of Equity (CAPM)

**Formula:** Cost of Equity = Rf + β × ERP

In cell **B10** (label "Cost of Equity" in A10):

```
=B5+B4*B6
```

This returns **9.31%** (= 4.30% + 0.91 × 5.50%).

---

## Step 3: Calculate the After-Tax Cost of Debt

**Formula:** After-Tax Kd = Pre-Tax Kd × (1 − Tax Rate)

In cell **B11** (label "After-Tax Cost of Debt" in A11):

```
=B7*(1-B8)
```

This returns **3.94%** (= 4.80% × (1 − 0.18)).

---

## Step 4: Compute the Capital Structure Weights

**Formulas:**
- Weight of Equity: E / (E + D)
- Weight of Debt: D / (E + D)

In cell **B13** (label "Weight of Equity" in A13):

```
=B2/(B2+B3)
```

In cell **B14** (label "Weight of Debt" in A14):

```
=B3/(B2+B3)
```

Results: **W_E = 96.97%**, **W_D = 3.03%**. (Weights should always sum to 100% — verify with `=B13+B14`.)

---

## Step 5: Final WACC Formula

**Formula:** WACC = (W_E × Ke) + (W_D × Kd × (1 − t))

In cell **B16** (label "WACC" in A16):

```
=B13*B10+B14*B11
```

Alternatively, write it from raw inputs in one line for audit:

```
=(B2/(B2+B3))*(B5+B4*B6)+(B3/(B2+B3))*B7*(1-B8)
```

Result: **WACC ≈ 9.15%**

---

## Step 6: Sanity Check

- ✅ **Range check:** Large-cap tech WACCs typically fall between **8%–10%**. MSFT at 9.15% is consistent with published estimates (Damodaran, Morningstar).
- ✅ **Equity dominance:** Microsoft is ~97% equity-financed, so WACC should sit close to the cost of equity (9.31%) — and it does (9.15%). ✔
- ✅ **Weights sum to 1:** `=B13+B14` should equal 100%.
- ⚠️ **Stress test:** Try Rf = 4.0% and ERP = 6.0% → WACC becomes ~9.45%. Sensitivity is modest, which is expected for low-debt firms.

---

## Sample Output Table

| Cell | Metric | Value |
|------|--------|-------|
| B10 | Cost of Equity (CAPM) | **9.31%** |
| B11 | After-Tax Cost of Debt | **3.94%** |
| B13 | Weight of Equity | **96.97%** |
| B14 | Weight of Debt | **3.03%** |
| **B16** | **WACC** | **9.15%** |

**Next step:** Use this WACC as the discount rate for unlevered free cash flows in your DCF, and build a sensitivity table (Data → What-If Analysis → Data Table) flexing Beta and ERP to see terminal value impact.
Judge notes: The response flawlessly satisfies the query with a comprehensive, step-by-step Excel guide including labeled input cells, exact formulas, correct calculations for Microsoft's WACC (9.15%), a sanity check, and a sample output table—directly matching the user's requirements and desired output type.
Claude Haiku 4.5 9/10
# Complete WACC Calculation Guide for Microsoft in Excel

## Section 1: Set Up Input Assumptions

Create a clearly labeled assumptions section at the top of your worksheet. This makes your model transparent and easy to audit.

### Step 1: Organize Input Cells

| Cell | Label | Value | Source/Notes |
|------|-------|-------|--------------|
| A2 | Market Cap (millions) | 3,100,000 | Current market capitalization |
| B2 | 3100000 | | |
| A3 | Total Debt (millions) | 97,000 | From balance sheet |
| B3 | 97000 | | |
| A4 | Risk-Free Rate | 4.3% | 10-year Treasury yield |
| B4 | 0.043 | | |
| A5 | Beta | 0.91 | Bloomberg or Yahoo Finance |
| B5 | 0.91 | | |
| A6 | Equity Risk Premium | 5.5% | Market risk premium (historical average) |
| B6 | 0.055 | | |
| A7 | Pre-Tax Cost of Debt | 4.8% | Credit rating or weighted avg of debt instruments |
| B7 | 0.048 | | |
| A8 | Effective Tax Rate | 18% | From income statement (tax expense/EBT) |
| B8 | 0.18 | | |

**Key Notes:**
- Keep all percentages as decimals (4.3% = 0.043) for formula accuracy
- Source the risk-free rate from the most recent 10-year Treasury yield (currently ~4.3%)
- Beta should be unlevered or relevered to match Microsoft's capital structure; use 0.91 as provided
- Equity risk premium: Use historical long-term average (~5.5%) or forward-looking estimate

---

## Section 2: Calculate Cost of Equity (CAPM)

The Capital Asset Pricing Model determines the return equity holders require.

### Step 2: Cost of Equity Formula

In cell **A10**, type the label: `Cost of Equity (CAPM)`

In cell **B10**, enter the CAPM formula:

```
=B4+(B5*B6)
```

**Formula Breakdown:**
- `B4` = Risk-Free Rate (4.3%)
- `B5` = Beta (0.91)
- `B6` = Equity Risk Premium (5.5%)
- **Calculation:** 4.3% + (0.91 × 5.5%) = 4.3% + 5.005% = **9.305%**

**Result in B10:** `0.09305` (or 9.305% when formatted as percentage)

**Interpretation:** Microsoft equity investors require a 9.305% return to compensate for systematic risk.

---

## Section 3: Calculate After-Tax Cost of Debt

The tax deductibility of interest makes debt cheaper than its pre-tax rate.

### Step 3: After-Tax Cost of Debt Formula

In cell **A11**, type the label: `After-Tax Cost of Debt`

In cell **B11**, enter:

```
=B7*(1-B8)
```

**Formula Breakdown:**
- `B7` = Pre-Tax Cost of Debt (4.8%)
- `B8` = Effective Tax Rate (18%)
- **Calculation:** 4.8% × (1 − 0.18) = 4.8% × 0.82 = **3.936%**

**Result in B11:** `0.03936` (or 3.936%)

**Interpretation:** Due to tax deductibility of interest, Microsoft's effective cost of debt is only 3.936% after taxes.

---

## Section 4: Calculate Capital Structure Weights

Determine the proportion of equity and debt in the capital structure.

### Step 4a: Calculate Total Enterprise Value

In cell **A13**, type: `Enterprise Value (millions)`

In cell **B13**, enter:

```
=B2+B3
```

**Calculation:** 3,100,000 + 97,000 = **3,197,000 million**

**Result in B13:** `3197000`

### Step 4b: Weight of Equity

In cell **A14**, type: `Weight of Equity (E/V)`

In cell **B14**, enter:

```
=B2/B13
```

**Calculation:** 3,100,000 / 3,197,000 = **0.96967** (96.967%)

**Result in B14:** `0.96967`

### Step 4c: Weight of Debt

In cell **A15**, type: `Weight of Debt (D/V)`

In cell **B15**, enter:

```
=B3/B13
```

**Calculation:** 97,000 / 3,197,000 = **0.03033** (3.033%)

**Result in B15:** `0.03033`

**Sanity Check:** B14 + B15 should equal 1.0
```
=B14+B15
```
Result: `1.0` ✓

---

## Section 5: Calculate Final WACC

Combine all components into the weighted average cost of capital.

### Step 5: WACC Formula

In cell **A17**, type: `WACC`

In cell **B17**, enter the complete WACC formula:

```
=(B14*B10)+(B15*B11)
```

**Formula Breakdown:**
- `B14` = Weight of Equity (96.967%)
- `B10` = Cost of Equity (9.305%)
- `B15` = Weight of Debt (3.033%)
- `B11` = After-Tax Cost of Debt (3.936%)

**Calculation:**
```
= (0.96967 × 0.09305) + (0.03033 × 0.03936)
= 0.09024 + 0.00119
= 0.09143
```

**Result in B17:** `0.09143` **(9.143%)**

---

## Section 6: Complete Input & Output Table

Here's your fully completed assumptions and calculations table:

| **Section** | **Item** | **Cell** | **Value** | **Format** |
|---|---|---|---|---|
| **INPUTS** | Market Cap | B2 | 3,100,000 | millions |
| | Total Debt | B3 | 97,000 | millions |
| | Risk-Free Rate | B4 | 0.043 | 4.30% |
| | Beta | B5 | 0.91 | decimal |
| | Equity Risk Premium | B6 | 0.055 | 5.50% |
| | Pre-Tax Cost of Debt | B7 | 0.048 | 4.80% |
| | Tax Rate | B8 | 0.18 | 18.00% |
| **CALCULATIONS** | Cost of Equity | B10 | 0.09305 | **9.305%** |
| | After-Tax Cost of Debt | B11 | 0.03936 | **3.936%** |
| | Enterprise Value | B13 | 3,197,000 | millions |
| | Weight of Equity | B14 | 0.96967 | 96.97% |
| | Weight of Debt | B15 | 0.03033 | 3.03% |
| **RESULT** | **WACC** | **B17** | **0.09143** | **9.143%** |

---

## Section 7: Sanity Checks & Interpretation

### Check 1: Cost of Equity vs. Cost of Debt
✓ **PASS** – Cost of Equity (9.305%) > After-Tax Cost of Debt (3.936%)
- This is correct; equity is riskier, so it requires higher return

### Check 2: WACC Between Components
✓ **PASS** – WACC (9.143%) is between cost of debt (3.936%) and cost of equity (9.305%)
- Expected, since WACC is a weighted average

### Check 3: Weights Sum to 100%
✓ **PASS** – 96.97% + 3.03% = 100.00%

### Check 4: WACC Reasonableness for Microsoft
Judge notes: Excellent response that fully addresses the query with clear step-by-step instructions, exact Excel formulas with cell references, proper calculations for Microsoft's specific data, and comprehensive sanity checks—only minor improvement would be slightly more detail on why 9.143% is reasonable for Microsoft's risk profile.
Gemini 2.5 Pro 9/10
Of course. As a financial modeling expert, I'll guide you through calculating Microsoft's WACC in Excel using the data you've provided. This structured approach ensures clarity, accuracy, and easy auditing of your model.

Here is a step-by-step guide to setting up the WACC calculation in Excel.

---

### **Step 1: Set Up Input Assumptions**

First, organize all your inputs in a clearly labeled section. This makes your model easy to update and understand. I recommend putting labels in Column A and values in Column B.

| | **A** | **B** | **C** |
| :--- | :--- | :--- | :--- |
| **1** | **WACC Calculation: Microsoft (MSFT)** | | |
| **2** | **Market Capitalization (E)** | 3,100,000,000,000 | *Source: Public market data (e.g., Bloomberg, Yahoo Finance)* |
| **3** | **Total Debt (D)** | 97,000,000,000 | *Source: Company's latest 10-K/10-Q balance sheet* |
| **4** | **Beta (β)** | 0.91 | *Source: Bloomberg, Capital IQ, Refinitiv* |
| **5** | **Risk-Free Rate (Rf)** | 4.30% | *Source
Judge notes: Excellent match to query intent with structured step-by-step guidance, proper Excel formatting, clear cell references, data sourcing, and professional organization; output appears complete and directly addresses all five required components, with only minor incompleteness at the end preventing a perfect 10.
Grok 4.1 Fast Reasoning 9/10
## 1. Setting Up Input Assumptions
Create a dedicated section for inputs (e.g., rows 1-10 in columns A:B). Label column A and enter values in column B. Source notes provided.

1. A1: `Risk-free rate` (10-year Treasury yield) → B1: `4.3%`  
2. A2: `Beta` (from Yahoo Finance or Bloomberg) → B2: `0.91`  
3. A3: `Equity risk premium` (historical avg. or Damodaran data) → B3: `5.5%`  
4. A4: `Pre-tax cost of debt` (avg. yield on company debt) → B4: `4.8%`  
5. A5: `Effective tax rate` (from latest 10-K) → B5: `18%`  
6. A6: `Market capitalization` (current shares * price, in $B) → B6: `3100`  
7. A7: `Total debt` (from balance sheet, in $B) → B7: `97`  

## 2. Calculating Cost of Equity (CAPM)
Place calculations starting in row 12.

8. A12: `Cost of equity (CAPM)`  
   B12: `=B1 + B2 * B3`  
   *(Result: 9.31%)*  
   *Note: CAPM formula Rf + β × ERP.*

## 3. Calculating After-Tax Cost of Debt
9. A13: `After-tax cost of debt`  
   B13: `=B4 * (1 - B5)`  
   *(Result: 3.94%)*  
   *Note: Adjusts for tax shield on interest.*

## 4. Computing Capital Structure Weights
First, calculate total capital in B14.

10. A14: `Total capital`  
    B14: `=B6 + B7` *(Result: 3197)*  

11. A15: `Equity weight (E/V)`  
    B15: `=B6 / B14` *(Result: 97.0%)*  

12. A16: `Debt weight (D/V)`  
    B16: `=B7 / B14` *(Result: 3.0%)*  

## 5. Final WACC Calculation
13. A17: `WACC`  
    B17: `=B15 * B12 + B16 * B13`  
    *(Result: 9.15%)*  
    *Note: Weights sum to 100%; use market values for equity, book for debt approx.*

## 6. Sanity Check
14. A19: `Sanity checks`  
    - B19: `=B15 + B16` → *Should equal 1 (100%)* (Result: 100%)  
    - B20: `=B12` → *Equity cost > WACC > Debt cost* (9.31% > 9.15% > 3.94%)  
    - For MSFT: Low debt (3%), beta <1 → WACC ≈9%, reasonable vs. peers (e.g., 8-10%).

## Sample Output Table
| Metric                  | Value  |
|-------------------------|--------|
| Cost of Equity (CAPM)   | 9.31% |
| After-tax Cost of Debt  | 3.94% |
| Equity Weight           | 97.0% |
| Debt Weight             | 3.0%  |
| **WACC**                | **9.15%** |
Judge notes: Excellent, comprehensive walkthrough with correct formulas, proper cell references, clear sourcing notes, and realistic calculations for Microsoft; minor deduction only because it could have included a brief visual Excel screenshot mockup or emphasized market-value-of-debt considerations more explicitly.

What makes these work

  1. 01
    Use market values, not book

    For equity weight, use market cap (shares outstanding × current price), not book equity. For debt, use market value of debt if bonds trade, otherwise book value is acceptable. Mixing book and market values distorts the weights and the final WACC.

  2. 02
    Unlever and relever beta

    Raw regression betas reflect each comp's capital structure. Unlever each comp's beta using its own D/E, average the unlevered betas, then relever at your target's capital structure. This isolates business risk from financial risk.

  3. 03
    Separate inputs from calculations

    Put all assumptions (Rf, ERP, beta, Kd, tax, weights) in a clearly colored input block. Calculations reference the input cells only. A reviewer should be able to change one cell and see the WACC update without hunting through formulas.

  4. 04
    Cross-check against comps

    After computing WACC, list three to five comparable companies' WACCs from Bloomberg or a manual build. If your number is more than 150 bps off the median without a clear reason, revisit your beta or capital structure assumptions.

More example scenarios

#01 · Public SaaS company WACC for DCF
Input
Calculate WACC in Excel for a public SaaS company with $12B market cap, $800M total debt, levered beta of 1.35, 4.2% risk-free rate (10Y Treasury), 5.5% equity risk premium, 5.1% pre-tax cost of debt, and 23% effective tax rate. Show the cell layout and formulas.
Expected output
Excel layout with inputs in B2:B9, Cost of Equity in B11 using =B4+B5*B6 (10.625%), After-tax Cost of Debt in B12 using =B7*(1-B8) (3.93%), weights E/V and D/V in B14:B15 (93.8% / 6.2%), and WACC in B17 using =B14*B11+B15*B12 yielding 10.21%.
#02 · Private industrial company with comps-derived beta
Input
I'm valuing a private HVAC distributor. No public beta available. Build a WACC in Excel using unlevered betas from five public comps (average 0.85), relever at target 30% debt / 70% equity, Rf 4.2%, ERP 5.5%, pre-tax Kd 7%, tax 25%. Include the relevering formula.
Expected output
Relevered beta in B10: =B9*(1+(1-B11)*(B13/B14)) returning 1.12. Cost of Equity: 4.2%+1.12*5.5% = 10.36%. After-tax Kd: 7%*(1-25%) = 5.25%. WACC: 0.70*10.36% + 0.30*5.25% = 8.83%. Include a note that private company illiquidity premium of 2-3% may be added.
#03 · Sensitivity table on WACC drivers
Input
Create an Excel two-variable data table showing WACC sensitivity to beta (0.9 to 1.5 in 0.1 steps) and target debt weight (10% to 40% in 5% steps). Base case: Rf 4.2%, ERP 5.5%, Kd 6%, T 25%.
Expected output
Set up base WACC formula in B20 linked to beta (B5) and D/V (B15). Select range A22:H28 with beta values in top row, D/V in left column. Data > What-If Analysis > Data Table, Row input = B5, Column input = B15. Output grid shows WACC ranging from 6.8% to 10.2%.
#04 · WACC with preferred stock in the capital structure
Input
Add a preferred equity tranche to the WACC build. Market cap $5B, debt $2B, preferred $500M at 6% dividend yield, beta 1.1, Rf 4%, ERP 6%, Kd 5%, tax 21%.
Expected output
Three weights: E/V 66.7%, D/V 26.7%, P/V 6.7%. Cost of Equity 10.6%, After-tax Kd 3.95%, Cost of Preferred 6% (not tax-adjusted). WACC = 0.667*10.6% + 0.267*3.95% + 0.067*6% = 8.51%. Label each component clearly in separate cells for audit.

Common mistakes to avoid

  • Using book equity for weights

    Analysts often pull total equity from the balance sheet instead of market cap. This understates equity weight for profitable companies and inflates WACC. Always use current market capitalization.

  • Forgetting to tax-adjust cost of debt

    Kd in WACC must be after-tax: Kd × (1 − T). Plugging in the pre-tax yield overstates WACC by 100 to 200 bps depending on the tax rate and leverage, which materially understates enterprise value in a DCF.

  • Using a stale risk-free rate

    Pulling a 10Y Treasury rate from last quarter when rates have moved 50 bps changes cost of equity directly. Always use the current yield matched to your cash flow horizon, typically the 10Y for a standard DCF.

  • Ignoring capital structure targets

    Using today's D/V when the company is deleveraging or levering up gives a WACC that doesn't reflect the forecast period. Use a target or normalized capital structure consistent with the DCF horizon.

  • Double-counting risk

    Adding a size premium, country risk premium, and company-specific premium on top of a comps-derived beta can inflate cost of equity by 300+ bps. Pick a framework (CAPM, build-up, or modified CAPM) and apply it consistently.

Related queries

Frequently asked questions

What is the WACC formula in Excel?

WACC = (E/V)*Re + (D/V)*Rd*(1-T). In Excel: =E_weight*Cost_Equity + D_weight*Cost_Debt*(1-Tax_Rate). Use named ranges or cell references rather than hardcoded numbers so the model is auditable.

How do I calculate cost of equity in Excel?

Use CAPM: =Rf + Beta*(Rm-Rf) or =Rf + Beta*ERP. Pull Rf from the current 10Y Treasury, beta from a regression or Bloomberg, and use a 5-6% equity risk premium for developed markets.

Where do I get beta for WACC?

For public companies, use Bloomberg, Yahoo Finance, or a 2-5 year regression of stock returns against the S&P 500. For private companies, average unlevered betas from public comps and relever at the target's capital structure.

Should I use pre-tax or after-tax cost of debt?

After-tax. The WACC formula multiplies Rd by (1-T) because interest is tax-deductible. Use the effective tax rate or a normalized marginal rate around 21-25% for US companies.

How do I handle WACC for a private company in Excel?

Build cost of equity from comps: unlever each public comp's beta by its own D/E, average them, relever at your target capital structure, then apply CAPM. Consider adding a 2-3% size or illiquidity premium depending on the company profile.

What is a typical WACC range?

Most large-cap US companies fall between 6% and 12%. Stable utilities trend toward 5-7%, mature industrials 7-9%, tech and growth names 9-12%, and early-stage or distressed companies 15%+. If your number is outside these bands, audit your inputs.