Asc 842 Weighted Average Discount Rate Calculation

ASC 842 Weighted Average Discount Rate Calculator body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f8f9fa; color: #333; line-height: 1.6; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; } .container { width: 100%; max-width: 960px; margin: 20px auto; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; align-items: center; } header { text-align: center; margin-bottom: 30px; width: 100%; } h1 { color: #004a99; margin-bottom: 10px; } header p { font-size: 1.1em; color: #555; } .loan-calc-container { width: 100%; border: 1px solid #e0e0e0; border-radius: 8px; padding: 25px; background-color: #ffffff; margin-bottom: 30px; } .input-group { margin-bottom: 20px; width: 100%; display: flex; flex-direction: column; } .input-group label { font-weight: 600; margin-bottom: 8px; color: #004a99; display: block; } .input-group input[type="number"], .input-group select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 1em; transition: border-color 0.3s ease; } .input-group input[type="number"]:focus, .input-group select:focus { border-color: #004a99; outline: none; } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; } .input-group .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; min-height: 1.2em; } .button-group { display: flex; gap: 10px; margin-top: 25px; justify-content: center; flex-wrap: wrap; } button { padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: 500; transition: background-color 0.3s ease, transform 0.2s ease; } button.primary { background-color: #004a99; color: white; } button.primary:hover { background-color: #003366; transform: translateY(-1px); } button.secondary { background-color: #6c757d; color: white; } button.secondary:hover { background-color: #5a6268; transform: translateY(-1px); } button.tertiary { background-color: #28a745; color: white; } button.tertiary:hover { background-color: #218838; transform: translateY(-1px); } .results-container { width: 100%; margin-top: 30px; border: 1px solid #e0e0e0; border-radius: 8px; padding: 25px; background-color: #f0f2f5; } .results-container h2 { color: #004a99; text-align: center; margin-bottom: 20px; } .primary-result { background-color: #28a745; color: white; padding: 20px; text-align: center; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3); } .primary-result h3 { margin: 0 0 10px 0; font-size: 1.8em; } .primary-result p { margin: 0; font-size: 1.2em; } .intermediate-results { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 20px; margin-bottom: 20px; } .intermediate-results div { background-color: #e9ecef; padding: 15px; border-radius: 5px; text-align: center; flex: 1; min-width: 150px; } .intermediate-results h4 { margin: 0 0 5px 0; color: #004a99; font-size: 1.1em; } .intermediate-results p { margin: 0; font-size: 1.3em; font-weight: 600; } .formula-explanation { font-size: 0.95em; color: #555; text-align: center; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #ccc; } table { width: 100%; border-collapse: collapse; margin-top: 20px; margin-bottom: 30px; } th, td { padding: 12px; text-align: left; border-bottom: 1px solid #dee2e6; } th { background-color: #004a99; color: white; font-weight: 600; } td { background-color: #fdfdfd; } caption { caption-side: bottom; text-align: center; font-size: 0.9em; color: #6c757d; margin-top: 10px; } canvas { margin-top: 20px; display: block; margin-left: auto; margin-right: auto; max-width: 100%; height: auto !important; } .chart-container { text-align: center; margin-top: 30px; padding: 20px; background-color: #f0f2f5; border-radius: 8px; } .chart-container h3 { color: #004a99; margin-bottom: 15px; } .section { margin-top: 40px; width: 100%; } h2, h3, h4 { color: #004a99; margin-bottom: 15px; } h2 { font-size: 2em; } h3 { font-size: 1.5em; } h4 { font-size: 1.2em; } article { width: 100%; max-width: 960px; margin: 20px auto; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; align-items: center; } article p, article ul, article ol { margin-bottom: 15px; max-width: 750px; } article ul, article ol { padding-left: 20px; } article li { margin-bottom: 8px; } article strong { color: #004a99; } .faq-item { margin-bottom: 15px; padding: 10px; border: 1px solid #e0e0e0; border-radius: 4px; background-color: #f9f9f9; } .faq-item h4 { margin: 0 0 5px 0; cursor: pointer; color: #004a99; font-size: 1.1em; display: flex; justify-content: space-between; align-items: center; } .faq-item h4::after { content: '+'; font-size: 1.2em; } .faq-item.open h4::after { content: '-'; } .faq-content { display: none; margin-top: 10px; color: #555; } .related-links { margin-top: 20px; padding: 15px; background-color: #e9ecef; border-radius: 5px; } .related-links ul { list-style: none; padding: 0; } .related-links li { margin-bottom: 10px; } .related-links a { color: #004a99; text-decoration: none; font-weight: 500; } .related-links a:hover { text-decoration: underline; } .related-links span { font-size: 0.9em; color: #666; display: block; margin-top: 3px; } @media (max-width: 768px) { .container, article { padding: 15px; } button { width: 100%; } .button-group { flex-direction: column; align-items: center; } .intermediate-results { flex-direction: column; align-items: center; } .intermediate-results div { width: 80%; } }

ASC 842 Weighted Average Discount Rate Calculator

Accurately determine the weighted average discount rate required for ASC 842 lease accounting.

Calculate Weighted Average Discount Rate

The current yield on a U.S. Treasury security with a maturity matching the lease term.
The additional yield your company's debt would carry over the risk-free rate.
The total duration of the lease agreement.
Enter if you prefer to use a specific rate instead of calculating one. Leave blank to calculate.

Calculation Results

Weighted Average Discount Rate

Implied Discount Rate

Total Rate Components

Market Adjustment Factor

Formula Used: The Weighted Average Discount Rate (WADR) is calculated as the sum of the Risk-Free Rate and the Company Credit Spread. If a manual discount rate is provided, it overrides the calculated rate. The implied discount rate considers the lease term as a weight for a more nuanced approach, and the market adjustment factor reflects changes in credit conditions over time.

Discount Rate Components Over Lease Term

Chart showing how the Risk-Free Rate, Credit Spread, and implied total discount rate change across the lease term.

Key Rate Components & Assumptions

Assumption/Component Value Unit
Risk-Free Rate %
Company Credit Spread %
Lease Term Years
Calculated Implied Discount Rate (Avg) %
Calculated Weighted Average Discount Rate %

Understanding the ASC 842 Weighted Average Discount Rate Calculation

This comprehensive guide explains how to calculate and interpret the ASC 842 Weighted Average Discount Rate, a critical component for lease accounting under the new standards.

What is the ASC 842 Weighted Average Discount Rate?

The ASC 842 weighted average discount rate calculation is a crucial element in determining the present value of future lease payments for lessees under Accounting Standards Codification (ASC) 842, Leases. This rate represents the appropriate discount rate to use when calculating the present value of lease payments to arrive at the lease liability and the corresponding right-of-use (ROU) asset. For lessees, if the rate implicit in the lease is not readily determinable, they must use their incremental borrowing rate. The weighted average discount rate often serves as a proxy or a component in determining this incremental borrowing rate, especially for leases with varying payment structures or terms. Understanding this rate is vital for accurate financial reporting and for ensuring compliance with lease accounting standards.

Who should use it: Primarily, lessees (the entities leasing assets) are concerned with the ASC 842 weighted average discount rate calculation. This includes public and private companies that must adopt ASC 842. Lessors may also use discount rates, but the specifics differ. Financial analysts, auditors, and accounting professionals also need to understand this calculation for financial statement analysis and audit procedures.

Common misconceptions:

  • Confusing it with the interest rate on a loan: While related, the discount rate for leases is specifically about the present value of future payments, considering the time value of money and risk, not just a simple interest charge.
  • Assuming a single rate for all leases: Each lease might require a specific discount rate based on its terms, the asset, and the lessee's financial position at the commencement date.
  • Using the stated interest rate in the lease contract: Often, leases may not explicitly state an interest rate. When they do, it might not reflect the lessee's incremental borrowing rate or market conditions.
  • Ignoring the impact of creditworthiness: A company's credit risk significantly influences the discount rate; higher risk means a higher rate, leading to a lower present value of lease payments.

ASC 842 Weighted Average Discount Rate Formula and Mathematical Explanation

The core concept behind the discount rate in ASC 842 is to reflect the time value of money and the lessee's specific risk profile. If the rate implicit in the lease is not readily determinable, the lessee uses its incremental borrowing rate. The weighted average discount rate can be conceptualized as the blended rate reflecting these components. A common approach involves combining a risk-free rate with a credit spread.

A simplified calculation often used as a basis or proxy for the incremental borrowing rate is:

Weighted Average Discount Rate = Risk-Free Rate + Company Credit Spread

In practice, determining the precise incremental borrowing rate might involve more sophisticated modeling, potentially considering the lease term and specific market conditions. For instance, a weighted average approach can be applied where the discount rate for each period is influenced by the cash flows in that period. However, for practical calculator purposes and understanding the fundamental components, the summation approach is illustrative.

The calculator provides a simplified view:

  • Risk-Free Rate: Represents the theoretical return of an investment with zero risk. For ASC 842, this is typically approximated by the yield on a U.S. Treasury security with a maturity that matches the lease term.
  • Company Credit Spread: This is the additional yield your company would have to pay above the risk-free rate to borrow money, reflecting your creditworthiness. A higher credit spread indicates higher perceived risk.
  • Implied Discount Rate (Average): This can be seen as the blended rate considering the risk-free rate and credit spread over the lease term. It often involves a more complex calculation than simple addition, potentially weighting the rates based on lease payments over time.
  • Market Adjustment Factor: This is a conceptual factor that could be applied to adjust the calculated rate based on broader market volatility or specific economic conditions not captured by the credit spread alone. It's often implicit rather than explicit in basic calculations.

Variables Table

Variable Meaning Unit Typical Range
Risk-Free Rate (RFR) Yield on government security matching lease term % 1.0% – 5.0% (Varies with market conditions)
Company Credit Spread (CCS) Additional yield over RFR reflecting company risk % 0.5% – 10.0%+ (Depends heavily on credit rating)
Lease Term (LT) Duration of the lease agreement Years 1 – 30+ Years
Implied Discount Rate (IDR) Discount rate adjusted for lease term and cash flow timing % Usually between RFR + CCS and slightly higher
Market Adjustment Factor (MAF) Adjustment for broader economic volatility Factor (e.g., 0.9 to 1.1) or % adjustment Often implicit, rarely explicit outside complex models
Weighted Average Discount Rate (WADR) The blended, appropriate discount rate for lease liability calculation % Typically RFR + CCS, adjusted for specifics

Practical Examples (Real-World Use Cases)

Let's illustrate the ASC 842 weighted average discount rate calculation with practical scenarios.

Example 1: Standard Equipment Lease

A company enters into a 5-year lease for essential manufacturing equipment. The company's credit rating suggests an incremental borrowing cost reflected by a 2.5% credit spread over the current 10-year U.S. Treasury yield, which is 3.0%.

  • Inputs:
  • Risk-Free Rate: 3.0%
  • Company Credit Spread: 2.5%
  • Lease Term: 5 years
  • Manual Discount Rate: Blank (to calculate)

Calculation:

Weighted Average Discount Rate = Risk-Free Rate + Company Credit Spread
WADR = 3.0% + 2.5% = 5.5%

Result: The calculator would show a Weighted Average Discount Rate of 5.5%. This 5.5% rate would then be used to discount the lease payments to determine the present value of the lease liability and the ROU asset.

Financial Interpretation: A 5.5% discount rate signifies that future lease payments are worth significantly less today due to the time value of money and the company's borrowing risk. A higher credit spread (indicating poorer creditworthiness) would result in a higher WADR, thus a lower calculated lease liability and ROU asset.

Example 2: Lease with Shorter Term and Different Credit Profile

A smaller, less established company signs a 2-year lease for office space. Due to its lower credit rating, its incremental borrowing rate is higher, reflected by a 4.0% credit spread over the current 2-year U.S. Treasury yield, which is 2.0%.

  • Inputs:
  • Risk-Free Rate: 2.0%
  • Company Credit Spread: 4.0%
  • Lease Term: 2 years
  • Manual Discount Rate: Blank

Calculation:

Weighted Average Discount Rate = Risk-Free Rate + Company Credit Spread
WADR = 2.0% + 4.0% = 6.0%

Result: The calculator would output a Weighted Average Discount Rate of 6.0%.

Financial Interpretation: This higher discount rate (6.0%) compared to Example 1 reflects the greater risk associated with this company or the specific lease. It results in a lower present value for the lease payments, impacting the balance sheet figures accordingly. Understanding how the ASC 842 weighted average discount rate calculation changes based on these inputs is key. For more insights into financial risk, consider our lease risk assessment tools.

How to Use This ASC 842 Weighted Average Discount Rate Calculator

  1. Input Risk-Free Rate: Enter the current yield of a U.S. Treasury security that has a maturity date closest to the end of your lease term. This is your baseline risk-free rate.
  2. Input Company Credit Spread: Provide the percentage your company would typically pay above the risk-free rate to borrow money. This reflects your company's creditworthiness. If unsure, consult your treasury or finance department, or refer to your company's latest borrowing rates.
  3. Input Lease Term: Enter the total number of years the lease agreement spans. This helps determine the appropriate risk-free rate maturity and can influence more complex calculations.
  4. Optional: Manual Discount Rate: If you have already determined a specific discount rate for this lease (e.g., your entity-wide incremental borrowing rate) and prefer to use that, enter it here. Leave this field blank if you want the calculator to compute the rate based on the risk-free rate and credit spread.
  5. Click 'Calculate': The calculator will process your inputs.

How to read results:

  • Primary Result (Weighted Average Discount Rate): This is the main output, representing the blended rate to be used for discounting lease payments.
  • Intermediate Values: These provide a breakdown of the components that contribute to the final rate, offering transparency into the calculation.
  • Chart and Table: Visualize how rate components might evolve and see a summary of your inputs and key outputs.

Decision-making guidance: The calculated WADR is a key input for the lease accounting process. A higher WADR will decrease the present value of lease payments, thus lowering the reported lease liability and ROU asset. Conversely, a lower WADR increases these values. Understanding the sensitivity of the WADR to changes in market interest rates and your company's credit profile is crucial for financial planning and forecasting. For further analysis, explore our lease vs. buy analysis guide.

Key Factors That Affect ASC 842 Weighted Average Discount Rate Results

Several critical factors influence the outcome of the ASC 842 weighted average discount rate calculation and, consequently, the reported lease liabilities and assets:

  • Market Interest Rates (Risk-Free Rate): Fluctuations in benchmark rates like U.S. Treasury yields directly impact the starting point of the discount rate. Rising rates increase the WADR, while falling rates decrease it. This highlights the importance of using a rate appropriate for the lease commencement date.
  • Company Creditworthiness (Credit Spread): A company's financial health, credit rating, and perceived risk significantly affect its borrowing cost. A deteriorating credit profile leads to a wider credit spread, increasing the WADR and reducing the present value of lease payments. Conversely, an improving credit profile narrows the spread and lowers the WADR. This is a fundamental aspect of determining the incremental borrowing rate.
  • Lease Term: Longer lease terms generally imply greater uncertainty and potentially higher interest rate risk. While the calculation here uses a simplified approach, longer leases might necessitate using a risk-free rate with a matching maturity, and the incremental borrowing rate itself could potentially differ for very long-term financing compared to short-term.
  • Economic Conditions and Inflation: Broader economic outlooks and inflation expectations influence central bank policy rates and investor demands, indirectly affecting both risk-free rates and credit spreads. High inflation often correlates with higher interest rates.
  • Specific Lease Characteristics: While not directly in this simple calculator, the nature of the leased asset (e.g., volatile technology vs. stable real estate) and the specific terms of the lease (e.g., payment escalations, residual value guarantees) can influence the appropriate discount rate determination if the rate implicit in the lease is not readily determinable.
  • Borrowing Costs of Similar Entities: In practice, determining the incremental borrowing rate may involve benchmarking against what similar companies with comparable credit ratings could borrow at in the current market. This ensures the rate is market-based.

Frequently Asked Questions (FAQ)

What is the difference between the rate implicit in the lease and the lessee's incremental borrowing rate?

The rate implicit in the lease is the rate that causes the aggregate present value of (1) the lease payments and (2) any unguaranteed residual value to equal the sum of (a) the fair value of the underlying asset and (b) any initial direct costs of the lessor. If this rate is not readily determinable by the lessee, they must use their incremental borrowing rate – the rate at which the lessee could borrow funds on a collateralized basis over a similar term.

Can I use the interest rate from my company's line of credit?

Generally, no. The incremental borrowing rate should reflect the rate at which you could borrow funds on a collateralized basis over a similar term. A line of credit is typically unsecured and may have different terms and rates. You should aim for a rate that mirrors secured borrowing.

Does ASC 842 require a new discount rate for every lease?

For each new lease commenced, you generally determine a discount rate at the commencement date. However, for an existing lease, a new discount rate is only required if there's a lease modification that is accounted for as a separate lease. Otherwise, the rate determined at commencement is used throughout the lease term.

How often do I need to update the discount rate if market conditions change significantly?

Under ASC 842, the discount rate is generally fixed at the lease commencement date unless specific criteria for remeasurement due to a lease modification are met. You do not typically update the rate solely because market conditions (like interest rates) change after the commencement date.

What if my company has no external debt and thus no obvious incremental borrowing rate?

In such cases, companies may need to estimate what their borrowing rate would be if they were to borrow. This might involve looking at rates for comparable companies or seeking advice from financial institutions on what rate they might offer. The goal is to determine a rate that reflects the economic reality of borrowing for your entity.

Does the discount rate apply to both operating leases and finance leases?

Yes, for lessees, both operating leases and finance leases (formerly capital leases) require the recognition of a right-of-use asset and a lease liability. The calculation of the lease liability involves discounting future lease payments, and the discount rate used follows the same principles for both types of leases under ASC 842.

How does the discount rate affect the timing of expense recognition?

The discount rate directly impacts the initial measurement of the lease liability and ROU asset. While the total lease cost is recognized over the lease term, a higher discount rate leads to a lower initial liability and asset, and a different pattern of interest cost recognition compared to a lower rate. For operating leases, the total lease cost is typically recognized on a straight-line basis, but the interest component is based on the effective interest method.

Is the weighted average discount rate the same as the effective interest rate?

The weighted average discount rate (WADR) is the rate used to calculate the present value of lease payments at lease commencement. The effective interest rate (EIR) is essentially the WADR applied using the effective interest method to amortize the lease liability and recognize interest expense over the lease term. So, the WADR is the input rate for the EIR calculation for the lease liability.
var chartInstance = null; function isValidNumber(value) { return typeof value === 'number' && !isNaN(value); } function validateInputs() { var riskFreeRate = parseFloat(document.getElementById("riskFreeRate").value); var creditSpread = parseFloat(document.getElementById("creditSpread").value); var leaseTermYears = parseInt(document.getElementById("leaseTermYears").value); var discountRateAssumption = document.getElementById("discountRateAssumption").value === "" ? null : parseFloat(document.getElementById("discountRateAssumption").value); var valid = true; if (!isValidNumber(riskFreeRate) || riskFreeRate < 0) { document.getElementById("riskFreeRateError").textContent = "Please enter a valid positive number."; valid = false; } else { document.getElementById("riskFreeRateError").textContent = ""; } if (!isValidNumber(creditSpread) || creditSpread < 0) { document.getElementById("creditSpreadError").textContent = "Please enter a valid positive number."; valid = false; } else { document.getElementById("creditSpreadError").textContent = ""; } if (!isValidNumber(leaseTermYears) || leaseTermYears <= 0) { document.getElementById("leaseTermYearsError").textContent = "Please enter a valid positive integer."; valid = false; } else { document.getElementById("leaseTermYearsError").textContent = ""; } if (discountRateAssumption !== null && (!isValidNumber(discountRateAssumption) || discountRateAssumption < 0)) { document.getElementById("discountRateAssumptionError").textContent = "Please enter a valid positive number or leave blank."; valid = false; } else { document.getElementById("discountRateAssumptionError").textContent = ""; } return valid; } function calculateDiscountRate() { if (!validateInputs()) { return; } var riskFreeRate = parseFloat(document.getElementById("riskFreeRate").value); var creditSpread = parseFloat(document.getElementById("creditSpread").value); var leaseTermYears = parseInt(document.getElementById("leaseTermYears").value); var discountRateAssumption = document.getElementById("discountRateAssumption").value === "" ? null : parseFloat(document.getElementById("discountRateAssumption").value); var weightedAverageDiscountRate = 0; var impliedDiscountRate = 0; var totalRateComponents = 0; var marketAdjustmentFactor = 1.0; // Placeholder for simplicity if (discountRateAssumption !== null) { weightedAverageDiscountRate = discountRateAssumption; impliedDiscountRate = discountRateAssumption; totalRateComponents = discountRateAssumption; } else { totalRateComponents = riskFreeRate + creditSpread; weightedAverageDiscountRate = totalRateComponents; // Simplified base WADR impliedDiscountRate = calculateImpliedDiscountRate(riskFreeRate, creditSpread, leaseTermYears); } // Ensure results are not negative due to rounding or extreme inputs, though validation should prevent this. weightedAverageDiscountRate = Math.max(0, weightedAverageDiscountRate); impliedDiscountRate = Math.max(0, impliedDiscountRate); totalRateComponents = Math.max(0, totalRateComponents); document.getElementById("weightedAverageDiscountRateResult").textContent = weightedAverageDiscountRate.toFixed(2) + "%"; document.getElementById("impliedDiscountRateResult").textContent = impliedDiscountRate.toFixed(2) + "%"; document.getElementById("totalRateComponentsResult").textContent = totalRateComponents.toFixed(2) + "%"; document.getElementById("marketAdjustmentFactorResult").textContent = marketAdjustmentFactor.toFixed(2); // Update table document.getElementById("tableRiskFreeRate").textContent = riskFreeRate.toFixed(2); document.getElementById("tableCreditSpread").textContent = creditSpread.toFixed(2); document.getElementById("tableLeaseTerm").textContent = leaseTermYears; document.getElementById("tableImpliedDiscountRate").textContent = impliedDiscountRate.toFixed(2); document.getElementById("tableWADR").textContent = weightedAverageDiscountRate.toFixed(2); updateChart(riskFreeRate, creditSpread, impliedDiscountRate, leaseTermYears); } // Simplified calculation for implied discount rate, could be more complex function calculateImpliedDiscountRate(rfr, spread, term) { var baseRate = rfr + spread; // For simplicity, let's assume implied rate is slightly higher for longer terms // In reality, this would be based on yield curve and cash flow weighting var termFactor = 1 + (term * 0.01); // Small increase per year return baseRate * termFactor; } function updateChart(riskFreeRate, creditSpread, impliedDiscountRate, leaseTermYears) { var ctx = document.getElementById('discountRateChart').getContext('2d'); // Destroy previous chart instance if it exists if (chartInstance) { chartInstance.destroy(); } var labels = []; var riskFreeRateData = []; var creditSpreadData = []; var impliedRateData = []; // Represents the total rate (RFR + Spread) or the specific implied rate for (var i = 1; i <= leaseTermYears; i++) { labels.push('Year ' + i); riskFreeRateData.push(riskFreeRate); creditSpreadData.push(creditSpread); // For simplicity, let's show the base calculated rate (RFR + Spread) as a flat line here // A more complex chart might show a yield curve effect impliedRateData.push(riskFreeRate + creditSpread); } chartInstance = new Chart(ctx, { type: 'line', data: { labels: labels, datasets: [{ label: 'Risk-Free Rate (%)', data: riskFreeRateData, borderColor: 'rgba(54, 162, 235, 1)', backgroundColor: 'rgba(54, 162, 235, 0.2)', fill: false, tension: 0.1 }, { label: 'Company Credit Spread (%)', data: creditSpreadData, borderColor: 'rgba(255, 159, 64, 1)', backgroundColor: 'rgba(255, 159, 64, 0.2)', fill: false, tension: 0.1 }, { label: 'Implied Total Rate (%)', data: impliedRateData, borderColor: 'rgba(75, 192, 192, 1)', backgroundColor: 'rgba(75, 192, 192, 0.2)', fill: false, tension: 0.1 }] }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: false, title: { display: true, text: 'Rate (%)' } }, x: { title: { display: true, text: 'Lease Term' } } }, plugins: { title: { display: true, text: 'Discount Rate Components Over Lease Term' }, legend: { position: 'top', } } } }); } // Function to toggle FAQ content function toggleFaq(element) { var content = element.nextElementSibling; var item = element.parentElement; if (content.style.display === "block") { content.style.display = "none"; item.classList.remove("open"); } else { content.style.display = "block"; item.classList.add("open"); } } function resetCalculator() { document.getElementById("riskFreeRate").value = "3.0"; document.getElementById("creditSpread").value = "2.0"; document.getElementById("leaseTermYears").value = "5"; document.getElementById("discountRateAssumption").value = ""; document.getElementById("riskFreeRateError").textContent = ""; document.getElementById("creditSpreadError").textContent = ""; document.getElementById("leaseTermYearsError").textContent = ""; document.getElementById("discountRateAssumptionError").textContent = ""; // Clear results document.getElementById("weightedAverageDiscountRateResult").textContent = "–"; document.getElementById("impliedDiscountRateResult").textContent = "–"; document.getElementById("totalRateComponentsResult").textContent = "–"; document.getElementById("marketAdjustmentFactorResult").textContent = "–"; document.getElementById("tableRiskFreeRate").textContent = "–"; document.getElementById("tableCreditSpread").textContent = "–"; document.getElementById("tableLeaseTerm").textContent = "–"; document.getElementById("tableImpliedDiscountRate").textContent = "–"; document.getElementById("tableWADR").textContent = "–"; if (chartInstance) { chartInstance.destroy(); chartInstance = null; } // Optionally, re-initialize chart with placeholder data or clear it visually var ctx = document.getElementById('discountRateChart').getContext('2d'); ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); // Clear canvas } function copyResults() { var mainResult = document.getElementById("weightedAverageDiscountRateResult").textContent; var impliedResult = document.getElementById("impliedDiscountRateResult").textContent; var totalComponents = document.getElementById("totalRateComponentsResult").textContent; var marketFactor = document.getElementById("marketAdjustmentFactorResult").textContent; var tableRFR = document.getElementById("tableRiskFreeRate").textContent; var tableCS = document.getElementById("tableCreditSpread").textContent; var tableLT = document.getElementById("tableLeaseTerm").textContent; var tableImplied = document.getElementById("tableImpliedDiscountRate").textContent; var tableWADR = document.getElementById("tableWADR").textContent; var copyText = "ASC 842 Weighted Average Discount Rate Calculation Results:\n\n"; copyText += "Primary Result:\n"; copyText += "Weighted Average Discount Rate: " + mainResult + "\n\n"; copyText += "Key Intermediate Values:\n"; copyText += "Implied Discount Rate: " + impliedResult + "\n"; copyText += "Total Rate Components: " + totalComponents + "\n"; copyText += "Market Adjustment Factor: " + marketFactor + "\n\n"; copyText += "Key Assumptions & Components:\n"; copyText += "Risk-Free Rate: " + tableRFR + "%\n"; copyText += "Company Credit Spread: " + tableCS + "%\n"; copyText += "Lease Term: " + tableLT + " Years\n"; copyText += "Calculated Implied Discount Rate (Avg): " + tableImplied + "%\n"; copyText += "Calculated Weighted Average Discount Rate: " + tableWADR + "%\n"; // Use a temporary textarea to copy text to clipboard var textArea = document.createElement("textarea"); textArea.value = copyText; textArea.style.position = "fixed"; textArea.style.left = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'Results copied!' : 'Copying failed!'; // Optionally display a confirmation message to the user console.log(msg); // Simple feedback var originalButtonText = document.querySelector('.tertiary[onclick="copyResults()"]').textContent; document.querySelector('.tertiary[onclick="copyResults()"]').textContent = msg; setTimeout(function() { document.querySelector('.tertiary[onclick="copyResults()"]').textContent = originalButtonText; }, 2000); } catch (err) { console.error('Fallback: Oops, unable to copy', err); } document.body.removeChild(textArea); } // Initial calculation on load if default values are set document.addEventListener("DOMContentLoaded", function() { calculateDiscountRate(); });

Leave a Comment