Skip to content This library is free, offered as dana. If it helps your work, donate here →

This is one of 3,622 free prompts in the penguin tree ai library. Sign up once and the whole library opens, with new prompts by email.

open the library →

WACC calculator

Calculates weighted average cost of capital from capital structure, cost of debt, tax rate, and CAPM cost of equity inputs, showing every intermediate figure — levered beta, cost of equity, after-tax cost of debt…

download .md

Purpose

Compute a defensible weighted average cost of capital with full transparency into every component — cost of equity via CAPM, after-tax cost of debt, and market-value capital weights — so analysts can drop the resulting discount rate straight into a DCF or hurdle-rate decision and defend each input line by line.

When to Use

Invoke this skill when the user asks to:

  • Calculate WACC for a company, division, or project
  • Derive a discount rate for a DCF or intrinsic valuation
  • Set a hurdle rate for capital allocation or investment approval
  • Estimate cost of equity using CAPM
  • Re-lever or unlever beta to match a target capital structure
  • Stress-test how a valuation moves with changes in the discount rate

Inputs Required

Before starting, collect:

  • Capital structure: Market value (or target) of equity and debt, or a target debt-to-total-capital ratio
  • Cost of debt: Pre-tax cost of debt (yield to maturity on outstanding debt or current borrowing rate)
  • Marginal tax rate: The rate used to compute the interest tax shield
  • Beta: Levered (equity) beta, or an unlevered/industry beta plus the target structure to re-lever
  • Risk-free rate: Typically the 10-year government bond yield in the relevant currency
  • Equity risk premium: The market premium over the risk-free rate (historical or forward-looking)
  • Optional adjustments: Size premium, country risk premium, or a company-specific spread

If beta is provided as an industry/unlevered figure, re-lever it using the Hamada equation. If no adjustments are supplied, assume none and note it. If capital structure is missing, ask whether to use current or target weights before proceeding.

Instructions

Step 1: Establish Capital Weights

Convert the capital structure into weights based on market values, not book values.

  • Weight of equity: We = E / (E + D)
  • Weight of debt: Wd = D / (E + D)
  • If only a target D/(D+E) ratio is given, derive both weights directly from it
  • State whether weights are current or target, and flag that DCF valuation should use target/long-run weights when they differ materially from today's

Step 2: Re-Lever Beta if Needed

If an unlevered or industry beta is supplied, re-lever it to the target structure using the Hamada equation:

  • βL = βU × [1 + (1 − Tax) × (D / E)]
  • If a levered equity beta is already provided at the correct structure, use it directly and skip re-levering
  • Show the D/E ratio used and the resulting levered beta

Step 3: Calculate Cost of Equity via CAPM

Apply the Capital Asset Pricing Model:

  • Re = Rf + βL × ERP
  • Where Rf = risk-free rate, βL = levered beta, ERP = equity risk premium
  • Add any optional premiums (size, country, company-specific) as explicit line items: Re = Rf + βL × ERP + size premium + country premium
  • Show the arithmetic, not just the result

Step 4: Calculate After-Tax Cost of Debt

  • Rd(after-tax) = Rd(pre-tax) × (1 − Tax)
  • Show both the pre-tax and after-tax figures so the tax shield is visible

Step 5: Compute WACC

Combine the weighted components:

  • WACC = (We × Re) + (Wd × Rd × (1 − Tax))
  • Present a component table with each weight, each cost, and each weighted contribution, ending in the total WACC
  • Round the headline WACC to one decimal place; keep intermediate figures to two

Step 6: Build a Sensitivity Table

Produce a grid showing how WACC shifts with the two inputs most likely to be contested:

  • Rows: cost of equity drivers (vary beta by ±0.1 and ±0.2, or vary ERP by ±0.5%)
  • Columns: capital structure (vary Wd by ±5% and ±10%)
  • Populate each cell with the resulting WACC so the reviewer sees the plausible range, not just a point estimate

Step 7: Recommend the Discount Rate

  • State the base-case WACC as the recommended discount rate
  • Give a defensible range (e.g., "9.2%–10.4%") drawn from the sensitivity table
  • Flag the single input that swings the answer most and note where it should be pressure-tested
  • Be direct — commit to a number, then show the range around it

Output Format

  • Structure: Step-by-step derivation with a component table and a sensitivity grid, closing with a recommendation
  • Length: 500–800 words plus tables
  • Format: Structured document with two tables (WACC component table, sensitivity table) and inline formulas showing arithmetic
  • Sections: Inputs summary → Capital weights → Beta (re-levering if applicable) → Cost of equity (CAPM) → After-tax cost of debt → WACC component table → Sensitivity table → Recommended discount rate
  • Tone: Corporate finance analyst — precise, formula-first, every number traceable to an input

Quality Checklist

Before delivering output, verify:

  • [ ] Capital weights sum to 100% and are labeled as current or target
  • [ ] Cost of equity uses CAPM with the risk-free rate, levered beta, and ERP shown explicitly
  • [ ] Cost of debt is shown both pre-tax and after-tax, with the tax shield applied
  • [ ] The WACC component table's weighted contributions sum to the headline WACC
  • [ ] Beta re-levering (if performed) shows the Hamada formula, the D/E used, and the result
  • [ ] The sensitivity table contains at least a 3×3 grid of WACC values, and the base case appears in it

Notes

  • Always use market-value weights; book-value weights systematically distort the equity weight and understate WACC for leveraged firms
  • For a DCF, the WACC must be consistent with the currency and inflation basis of the cash flows and terminal growth rate
  • The risk-free rate and ERP should be measured in the same currency and market as the cash flows being discounted
  • If the company's current structure differs sharply from its long-run target, value the business on the target structure and note the near-term mismatch
  • A common error is applying the statutory tax rate when the effective marginal rate differs — use the marginal rate that actually applies to incremental interest

How to use this skill

This file is a Claude Code skill in Anthropic's standard format — markdown with YAML frontmatter at the top.

Installing in Claude Code:

  • ~/.claude/skills/<folder-name>/SKILL.md — auto-loads in every session anywhere on your machine (recommended for skills you'll use across multiple projects)
  • <your-project>/.claude/skills/<folder-name>/SKILL.md — auto-loads only when working in that project (recommended for project-specific skills)

Restart Claude Code or open a new session to register.

Using in Claude.ai, ChatGPT, Gemini, or other AI tools:

  1. Drag this file into a new chat, or copy and paste its contents
  2. Send your task or request as your next message — the AI will apply the skill where it fits

For Claude Code skill details: https://docs.anthropic.com/en/docs/claude-code/skills