How to Calculate Weighted Average Cost of Capital Wacc

How to Calculate Weighted Average Cost of Capital (WACC) :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ddd; –card-background: #ffffff; –shadow: 0 4px 8px rgba(0,0,0,0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; margin: 0; padding: 0; background-color: var(–background-color); color: var(–text-color); display: flex; flex-direction: column; align-items: center; } .container { width: 100%; max-width: 1000px; margin: 20px auto; padding: 20px; background-color: var(–card-background); border-radius: 8px; box-shadow: var(–shadow); box-sizing: border-box; } header { background-color: var(–primary-color); color: white; padding: 20px 0; text-align: center; width: 100%; margin-bottom: 30px; } header h1 { margin: 0; font-size: 2.5em; } h1, h2, h3 { color: var(–primary-color); margin-bottom: 15px; } h1 { font-size: 2.2em; text-align: center; } h2 { font-size: 1.8em; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; margin-top: 30px; } h3 { font-size: 1.4em; margin-top: 25px; } .calculator-section { background-color: var(–card-background); padding: 30px; border-radius: 8px; box-shadow: var(–shadow); margin-bottom: 30px; } .loan-calc-container { display: flex; flex-direction: column; gap: 20px; } .input-group { display: flex; flex-direction: column; gap: 8px; } .input-group label { font-weight: bold; color: var(–primary-color); } .input-group input[type="number"], .input-group input[type="text"], .input-group select { padding: 12px; border: 1px solid var(–border-color); border-radius: 4px; font-size: 1em; box-sizing: border-box; transition: border-color 0.3s ease; } .input-group input[type="number"]:focus, .input-group input[type="text"]:focus, .input-group select:focus { border-color: var(–primary-color); outline: none; } .input-group small { color: #6c757d; font-size: 0.85em; } .error-message { color: red; font-size: 0.85em; margin-top: 5px; min-height: 1.2em; /* Reserve space to prevent layout shift */ } button { background-color: var(–primary-color); color: white; border: none; padding: 12px 20px; border-radius: 4px; cursor: pointer; font-size: 1.1em; transition: background-color 0.3s ease, transform 0.2s ease; margin-top: 10px; } button:hover { background-color: #003366; transform: translateY(-2px); } button.secondary { background-color: #6c757d; margin-left: 10px; } button.secondary:hover { background-color: #5a6268; } #results-container { margin-top: 30px; padding: 25px; border: 1px dashed var(–primary-color); border-radius: 8px; background-color: #e7f3ff; display: flex; flex-direction: column; gap: 15px; } #results-container h2 { margin-top: 0; border-bottom: none; text-align: center; color: var(–primary-color); } .main-result { font-size: 2em; font-weight: bold; color: var(–success-color); text-align: center; background-color: var(–card-background); padding: 15px; border-radius: 4px; margin-bottom: 10px; } .intermediate-results div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; } .intermediate-results div:last-child { border-bottom: none; } .key-assumptions { font-size: 0.9em; color: #555; margin-top: 15px; padding: 10px; background-color: #f0f8ff; border-left: 3px solid var(–primary-color); } table { width: 100%; border-collapse: collapse; margin-top: 20px; box-shadow: var(–shadow); } th, td { padding: 12px 15px; text-align: left; border: 1px solid var(–border-color); } thead { background-color: var(–primary-color); color: white; } th { font-weight: bold; } tbody tr:nth-child(even) { background-color: #f2f2f2; } caption { caption-side: top; font-weight: bold; font-size: 1.1em; color: var(–primary-color); margin-bottom: 10px; text-align: left; } .chart-container { margin-top: 30px; padding: 25px; background-color: var(–card-background); border-radius: 8px; box-shadow: var(–shadow); text-align: center; } canvas { max-width: 100%; height: auto; } .article-content { margin-top: 30px; background-color: var(–card-background); padding: 30px; border-radius: 8px; box-shadow: var(–shadow); } .article-content p { margin-bottom: 15px; } .article-content a { color: var(–primary-color); text-decoration: none; } .article-content a:hover { text-decoration: underline; } .faq-section dt { font-weight: bold; color: var(–primary-color); margin-top: 20px; margin-bottom: 5px; } .faq-section dd { margin-left: 20px; margin-bottom: 15px; } .internal-links ul { list-style: none; padding: 0; } .internal-links li { margin-bottom: 10px; } .internal-links a { font-weight: bold; } .internal-links span { display: block; font-size: 0.9em; color: #666; margin-top: 3px; } @media (max-width: 768px) { header h1 { font-size: 1.8em; } h1 { font-size: 1.8em; } h2 { font-size: 1.5em; } h3 { font-size: 1.2em; } .container { padding: 15px; } .calculator-section, #results-container, .chart-container, .article-content { padding: 20px; } button { font-size: 1em; padding: 10px 15px; } .main-result { font-size: 1.6em; } th, td { padding: 10px 8px; font-size: 0.9em; } }

WACC Calculator & Guide

Weighted Average Cost of Capital (WACC) Calculator

Calculate your company's WACC to understand the cost of financing and evaluate investment opportunities.

The proportion of equity in your capital structure (e.g., 60% = 0.60).
The return required by equity investors (e.g., 12% = 0.12).
The proportion of debt in your capital structure (e.g., 40% = 0.40).
The interest rate on your debt before tax (e.g., 5% = 0.05).
Your company's effective corporate tax rate (e.g., 21% = 0.21).

WACC Calculation Results

Key Assumptions:

The WACC calculation assumes that the weights of debt and equity represent the company's target capital structure and that the costs of debt and equity are stable. The tax rate used is the company's effective corporate tax rate.

Formula Used: WACC = (We * Re) + (Wd * Rd * (1 – Tc))

WACC Components Breakdown

Contribution of Equity and Debt to WACC

Understanding How to Calculate Weighted Average Cost of Capital (WACC)

Understanding your company's cost of capital is fundamental to sound financial management and strategic decision-making. The Weighted Average Cost of Capital (WACC) is a critical metric that represents the average rate of return a company expects to pay to its security holders to finance its assets. It is essentially the blended cost of a company's debt and equity financing. This guide will walk you through what WACC is, how to calculate it using our interactive calculator, and why it's so important for businesses. Mastering how to calculate Weighted Average Cost of Capital WACC is essential for any finance professional.

What is Weighted Average Cost of Capital (WACC)?

The Weighted Average Cost of Capital (WACC) is the average rate of return a company expects to pay to all its investors, including common stockholders, preferred stockholders, bondholders, and other lenders. It is calculated by taking the proportion of each type of capital in the company's capital structure (e.g., equity, debt) and multiplying it by its associated cost. The results are then summed up to determine the WACC. This metric is crucial for evaluating potential investments and projects. If a company's expected return on an investment is higher than its WACC, the investment is likely to be value-creating. Conversely, if the expected return is lower than the WACC, the investment may not be profitable. Calculating how to calculate Weighted Average Cost of Capital WACC helps in understanding the company's overall financial health and its ability to fund future growth.

Who should use it?

  • Financial Analysts: To value companies and projects.
  • Corporate Finance Managers: To make capital budgeting decisions and set hurdle rates for investments.
  • Investors: To assess the risk and return profile of a company.
  • Business Owners: To understand the cost of capital and make strategic decisions about financing and growth.

Common misconceptions:

  • WACC is the same as the interest rate on debt: WACC includes the cost of equity, which is typically higher than the cost of debt, and it also accounts for the tax deductibility of interest.
  • WACC is a fixed number: WACC fluctuates with market conditions, the company's risk profile, and changes in its capital structure.
  • WACC is the required return on all investments: While WACC is a good baseline, specific projects might have different risk profiles requiring different hurdle rates.

WACC Formula and Mathematical Explanation

The formula for calculating Weighted Average Cost of Capital (WACC) is a cornerstone of corporate finance. It provides a single, representative rate that captures the cost of financing from all sources. The general formula is:

WACC = (We * Re) + (Wd * Rd * (1 – Tc))

Let's break down each component:

  • We (Weight of Equity): This represents the proportion of the company's total capital that is financed by equity. It is calculated as Market Value of Equity / (Market Value of Equity + Market Value of Debt).
  • Re (Cost of Equity): This is the rate of return that equity investors require for their investment in the company. It is often estimated using models like the Capital Asset Pricing Model (CAPM).
  • Wd (Weight of Debt): This represents the proportion of the company's total capital that is financed by debt. It is calculated as Market Value of Debt / (Market Value of Equity + Market Value of Debt). Note that We + Wd should typically equal 1 (or 100%).
  • Rd (Cost of Debt): This is the effective interest rate that a company pays on its debt. It's usually the yield to maturity on its outstanding long-term debt.
  • Tc (Corporate Tax Rate): This is the company's effective corporate tax rate. The cost of debt is multiplied by (1 – Tc) because interest payments are tax-deductible, creating a "tax shield" that reduces the effective cost of debt.

Variables Table

Variable Meaning Unit Typical Range
We Weight of Equity Proportion (Decimal) 0.20 to 0.90
Re Cost of Equity Percentage (Decimal) 0.08 to 0.20 (or higher for riskier companies)
Wd Weight of Debt Proportion (Decimal) 0.10 to 0.80
Rd Cost of Debt Percentage (Decimal) 0.03 to 0.10
Tc Corporate Tax Rate Percentage (Decimal) 0.15 to 0.35

Calculating how to calculate Weighted Average Cost of Capital WACC is a multi-step process involving several inputs, each representing a crucial aspect of a company's financial structure and market perception.

Practical Examples (Real-World Use Cases)

Example 1: Technology Startup

A rapidly growing tech startup is seeking to evaluate a new product development project. They need to determine if the project's expected returns will exceed their cost of capital.

  • Weight of Equity (We): 0.70 (70% equity financing)
  • Cost of Equity (Re): 0.15 (15% required return)
  • Weight of Debt (Wd): 0.30 (30% debt financing)
  • Cost of Debt (Rd): 0.06 (6% interest rate on loans)
  • Corporate Tax Rate (Tc): 0.25 (25% tax rate)

Calculation:

After-Tax Cost of Debt = Rd * (1 – Tc) = 0.06 * (1 – 0.25) = 0.06 * 0.75 = 0.045

WACC = (We * Re) + (Wd * After-Tax Cost of Debt)

WACC = (0.70 * 0.15) + (0.30 * 0.045)

WACC = 0.105 + 0.0135

WACC = 0.1185 or 11.85%

Interpretation: The startup's WACC is 11.85%. Any project undertaken must be expected to generate returns higher than this rate to create value for shareholders. This provides a clear hurdle rate for investment decisions. This example highlights how complex it can be to calculate Weighted Average Cost of Capital WACC.

Example 2: Established Manufacturing Company

An established manufacturing firm is considering expanding its production capacity. They need to determine their WACC to assess the viability of this large capital expenditure.

  • Weight of Equity (We): 0.50 (50% equity financing)
  • Cost of Equity (Re): 0.10 (10% required return)
  • Weight of Debt (Wd): 0.50 (50% debt financing)
  • Cost of Debt (Rd): 0.05 (5% interest rate on bonds)
  • Corporate Tax Rate (Tc): 0.21 (21% tax rate)

Calculation:

After-Tax Cost of Debt = Rd * (1 – Tc) = 0.05 * (1 – 0.21) = 0.05 * 0.79 = 0.0395

WACC = (We * Re) + (Wd * After-Tax Cost of Debt)

WACC = (0.50 * 0.10) + (0.50 * 0.0395)

WACC = 0.050 + 0.01975

WACC = 0.06975 or 6.98%

Interpretation: The established company has a lower WACC of 6.98%, reflecting its lower risk profile compared to the startup. This lower cost of capital allows it to pursue projects with lower expected returns that might still be profitable. Understanding how to calculate Weighted Average Cost of Capital WACC is crucial for these investment appraisals.

How to Use This WACC Calculator

Our WACC calculator is designed to be intuitive and provide quick insights into your company's cost of capital. Follow these simple steps:

  1. Input Weights: Enter the proportion (as a decimal) of equity and debt that make up your company's capital structure in the "Weight of Equity (We)" and "Weight of Debt (Wd)" fields. Ensure these weights sum up to 1 (or 100%).
  2. Input Costs: Enter the cost of equity (Re) and the cost of debt (Rd) as decimals. For example, a 12% cost of equity is entered as 0.12.
  3. Input Tax Rate: Enter your company's corporate tax rate (Tc) as a decimal (e.g., 21% is 0.21).
  4. Calculate: Click the "Calculate WACC" button.

How to read results:

  • Primary Result (WACC): This is the main output, displayed prominently in green, showing your company's overall Weighted Average Cost of Capital.
  • Intermediate Results: These provide breakdowns:
    • Equity Component Cost: (We * Re) – Shows the contribution of equity to the WACC.
    • After-Tax Cost of Debt: (Rd * (1 – Tc)) – Shows the effective cost of debt after considering tax benefits.
    • Debt Component Cost: (Wd * After-Tax Cost of Debt) – Shows the contribution of debt to the WACC.
  • Key Assumptions & Formula: Review the section detailing the formula used and the underlying assumptions for context.

Decision-making guidance:

  • Investment Appraisal: Use the calculated WACC as the discount rate (hurdle rate) for Net Present Value (NPV) calculations. Projects with an expected return (IRR) greater than WACC are generally favorable.
  • Valuation: WACC is a key input in discounted cash flow (DCF) models for business valuation.
  • Capital Structure Optimization: While this calculator doesn't optimize, understanding WACC can inform decisions about whether to issue more debt or equity.

Accurate inputs are vital for accurate results when using this tool for how to calculate Weighted Average Cost of Capital WACC.

Key Factors That Affect WACC Results

Several factors influence a company's Weighted Average Cost of Capital (WACC), making it a dynamic rather than static figure. Understanding these drivers is key to interpreting WACC accurately:

  1. Market Interest Rates: As benchmark interest rates (like those set by central banks or the yields on government bonds) rise or fall, the cost of debt (Rd) generally moves in the same direction. This directly impacts the debt component of WACC.
  2. Company's Risk Profile: Higher perceived risk (operational, financial, or market risk) leads investors to demand higher returns. This increases the cost of equity (Re) and potentially the cost of debt (Rd), thereby raising WACC. A stable company with predictable cash flows will generally have a lower risk profile and thus a lower WACC.
  3. Capital Structure (Weights): The mix of debt and equity significantly impacts WACC. Debt is often cheaper than equity (especially after tax benefits), so increasing the proportion of debt *can* lower WACC, up to a point. However, excessive debt increases financial risk, which can eventually drive up both Rd and Re, increasing WACC. This is why the "weighted" aspect is so crucial in how to calculate Weighted Average Cost of Capital WACC.
  4. Corporate Tax Rates: Changes in tax legislation directly affect the after-tax cost of debt (Rd * (1 – Tc)). Higher tax rates make the tax shield more valuable, reducing the effective cost of debt and potentially lowering WACC, assuming other factors remain constant.
  5. Equity Market Conditions: General stock market sentiment and performance influence the cost of equity (Re). In a bull market, investors may accept lower returns, potentially lowering Re. Conversely, during market downturns or periods of high uncertainty, Re tends to increase as investors become more risk-averse.
  6. Company Performance and Growth Prospects: Strong financial performance, consistent profitability, and positive future growth outlook reduce perceived risk, potentially lowering both Re and Rd. Conversely, poor performance or dim prospects increase risk and WACC.
  7. Inflation Expectations: Higher inflation typically leads to higher nominal interest rates across the board, increasing both Rd and Re, and thus WACC. Investors require higher nominal returns to compensate for the erosion of purchasing power.

Frequently Asked Questions (FAQ)

What is the ideal WACC?
There isn't a single "ideal" WACC. The goal is to have the lowest possible WACC that reflects the company's risk profile. A lower WACC generally means a lower cost of capital, making more investments profitable. However, forcing WACC down by taking on excessive debt increases risk.
Can WACC be negative?
In extremely rare circumstances, a company might have a negative WACC if its cost of debt is negative (which is highly unusual) and its cost of equity is also very low. However, for practical purposes and most businesses, WACC is always positive.
How often should WACC be recalculated?
WACC should be recalculated whenever there are significant changes in the company's capital structure, market interest rates, its risk profile, or tax laws. A common practice is to review and recalculate it annually, or more frequently if major events occur.
What's the difference between cost of debt and cost of equity?
The cost of debt is the interest a company pays on its borrowed funds, adjusted for tax savings. The cost of equity is the return required by shareholders for investing in the company, reflecting the risk they take. Equity is generally considered riskier than debt, so the cost of equity is typically higher than the cost of debt.
Why do we use the *after-tax* cost of debt in the WACC formula?
Interest payments on debt are usually tax-deductible. This means that the government effectively subsidizes a portion of the interest expense. The (1 – Tc) factor in the WACC formula accounts for this tax shield, calculating the true economic cost of debt financing.
How is the cost of equity (Re) calculated?
The most common method is the Capital Asset Pricing Model (CAPM), which states: Re = Rf + Beta * (Rm – Rf), where Rf is the risk-free rate, Beta measures the stock's volatility relative to the market, and (Rm – Rf) is the market risk premium.
Can WACC be used for private companies?
Yes, but it's more challenging. Calculating WACC for private companies requires estimating market values for debt and equity (often based on comparable public companies or valuation multiples) and estimating the cost of equity using methods like CAPM, which can be complex without publicly traded stock.
What if a company has preferred stock?
If a company uses preferred stock, the WACC formula expands to include a third component: WACC = (We * Re) + (Wd * Rd * (1 – Tc)) + (Wp * Rp), where Wp is the weight of preferred stock and Rp is the cost of preferred stock.

© 2023 Your Financial Insights. All rights reserved.

var canvas = document.getElementById('waccChart'); var ctx = canvas.getContext('2d'); var chart = null; function updateChart(equityComponent, debtComponent) { if (chart) { chart.destroy(); } chart = new Chart(ctx, { type: 'pie', data: { labels: ['Equity Component (We * Re)', 'Debt Component (Wd * Rd * (1-Tc))'], datasets: [{ label: 'WACC Components', data: [equityComponent, debtComponent], backgroundColor: [ 'rgba(0, 74, 153, 0.7)', // Primary color for equity 'rgba(40, 167, 69, 0.7)' // Success color for debt ], borderColor: [ 'rgba(0, 74, 153, 1)', 'rgba(40, 167, 69, 1)' ], borderWidth: 1 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'bottom', }, title: { display: true, text: 'WACC Breakdown by Capital Source', font: { size: 16 } } } } }); } function validateInput(id, errorId, minValue = null, maxValue = null) { var input = document.getElementById(id); var errorDiv = document.getElementById(errorId); var value = parseFloat(input.value); errorDiv.textContent = "; if (input.value === ") { errorDiv.textContent = 'This field is required.'; return false; } if (isNaN(value)) { errorDiv.textContent = 'Please enter a valid number.'; return false; } if (minValue !== null && value maxValue) { errorDiv.textContent = 'Value exceeds maximum allowed.'; return false; } if (id === 'equityWeight' || id === 'debtWeight') { if (value 1) { errorDiv.textContent = 'Weight must be between 0 and 1.'; return false; } } if (id === 'taxRate') { if (value 1) { errorDiv.textContent = 'Tax rate must be between 0 and 1 (e.g., 0.21 for 21%).'; return false; } } if (id === 'costOfEquity' || id === 'costOfDebt') { if (value 2) { // Reasonable upper limit for costs errorDiv.textContent = 'Cost should typically be between 0% and 200% (as a decimal).'; return false; } } return true; } function calculateWACC() { var inputsValid = true; inputsValid &= validateInput('equityWeight', 'equityWeightError', 0); inputsValid &= validateInput('costOfEquity', 'costOfEquityError', 0); inputsValid &= validateInput('debtWeight', 'debtWeightError', 0); inputsValid &= validateInput('costOfDebt', 'costOfDebtError', 0); inputsValid &= validateInput('taxRate', 'taxRateError', 0); var equityWeight = parseFloat(document.getElementById('equityWeight').value); var costOfEquity = parseFloat(document.getElementById('costOfEquity').value); var debtWeight = parseFloat(document.getElementById('debtWeight').value); var costOfDebt = parseFloat(document.getElementById('costOfDebt').value); var taxRate = parseFloat(document.getElementById('taxRate').value); // Additional validation for sum of weights if (Math.abs(equityWeight + debtWeight – 1) > 0.01) { // Allow for small floating point errors document.getElementById('equityWeightError').textContent = 'Weights must sum to 1.'; document.getElementById('debtWeightError').textContent = 'Weights must sum to 1.'; inputsValid = false; } if (!inputsValid) { document.getElementById('mainWACCResult').textContent = '–'; document.getElementById('intermediateWACC').innerHTML = 'Equity Component: –After-Tax Debt Cost: –Debt Component: –'; document.getElementById('intermediateEquityComponent').textContent = "; updateChart(0, 0); // Clear chart return; } var afterTaxDebtCost = costOfDebt * (1 – taxRate); var equityComponent = equityWeight * costOfEquity; var debtComponent = debtWeight * afterTaxDebtCost; var wacc = equityComponent + debtComponent; var formattedWACC = (wacc * 100).toFixed(2) + '%'; var formattedEquityComponent = (equityComponent * 100).toFixed(2) + '%'; var formattedAfterTaxDebtCost = (afterTaxDebtCost * 100).toFixed(2) + '%'; var formattedDebtComponent = (debtComponent * 100).toFixed(2) + '%'; document.getElementById('mainWACCResult').textContent = formattedWACC; document.getElementById('intermediateWACC').innerHTML = 'Equity Component: ' + formattedEquityComponent + 'After-Tax Debt Cost: ' + formattedAfterTaxDebtCost + 'Debt Component: ' + formattedDebtComponent; document.getElementById('intermediateEquityComponent').textContent = 'Cost of Equity (Re): ' + (costOfEquity * 100).toFixed(2) + '% | Weight of Equity (We): ' + (equityWeight * 100).toFixed(2) + '%'; // Update chart data updateChart(equityComponent, debtComponent); } function resetCalculator() { document.getElementById('equityWeight').value = '0.60'; document.getElementById('costOfEquity').value = '0.12'; document.getElementById('debtWeight').value = '0.40'; document.getElementById('costOfDebt').value = '0.05'; document.getElementById('taxRate').value = '0.21'; // Clear error messages document.getElementById('equityWeightError').textContent = "; document.getElementById('costOfEquityError').textContent = "; document.getElementById('debtWeightError').textContent = "; document.getElementById('costOfDebtError').textContent = "; document.getElementById('taxRateError').textContent = "; calculateWACC(); // Recalculate with default values } function copyResults() { var mainResult = document.getElementById('mainWACCResult').textContent; var intermediateResultsText = document.getElementById('intermediateWACC').textContent.replace(//g, '\n'); var assumptions = document.getElementById('results-container').querySelector('.key-assumptions').textContent; var textToCopy = "WACC Calculation Results:\n\n"; textToCopy += "Weighted Average Cost of Capital (WACC): " + mainResult + "\n\n"; textToCopy += "Breakdown:\n" + intermediateResultsText + "\n\n"; textToCopy += assumptions; // Use the modern Clipboard API if available, otherwise fallback if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(textToCopy).then(function() { alert('Results copied to clipboard!'); }).catch(function(err) { console.error('Failed to copy text: ', err); fallbackCopyTextToClipboard(textToCopy); }); } else { fallbackCopyTextToClipboard(textToCopy); } } function fallbackCopyTextToClipboard(text) { var textArea = document.createElement("textarea"); textArea.value = text; textArea.style.position = "fixed"; textArea.style.left = "-9999px"; textArea.style.top = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'Results copied to clipboard!' : 'Failed to copy results.'; alert(msg); } catch (err) { console.error('Fallback: Oops, unable to copy', err); alert('Failed to copy results. Please copy manually.'); } document.body.removeChild(textArea); } // Initial calculation on page load with default values document.addEventListener('DOMContentLoaded', function() { resetCalculator(); // Ensure chart is initialized correctly var equityWeight = parseFloat(document.getElementById('equityWeight').value); var costOfEquity = parseFloat(document.getElementById('costOfEquity').value); var debtWeight = parseFloat(document.getElementById('debtWeight').value); var costOfDebt = parseFloat(document.getElementById('costOfDebt').value); var taxRate = parseFloat(document.getElementById('taxRate').value); var equityComponent = equityWeight * costOfEquity; var afterTaxDebtCost = costOfDebt * (1 – taxRate); var debtComponent = debtWeight * afterTaxDebtCost; updateChart(equityComponent, debtComponent); }); // Add event listeners for real-time updates document.getElementById('equityWeight').addEventListener('input', calculateWACC); document.getElementById('costOfEquity').addEventListener('input', calculateWACC); document.getElementById('debtWeight').addEventListener('input', calculateWACC); document.getElementById('costOfDebt').addEventListener('input', calculateWACC); document.getElementById('taxRate').addEventListener('input', calculateWACC);

Leave a Comment