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; } .container { max-width: 960px; margin: 20px auto; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; align-items: center; } header { width: 100%; text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eee; } h1 { color: #004a99; margin-bottom: 10px; } .summary { font-size: 1.1em; color: #555; margin-bottom: 30px; text-align: center; } .calculator-section { width: 100%; margin-bottom: 40px; padding: 30px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); border: 1px solid #e0e0e0; } .calculator-section h2 { color: #004a99; text-align: center; margin-bottom: 25px; } .input-group { margin-bottom: 20px; width: 100%; text-align: left; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #555; } .input-group input[type="number"], .input-group select { width: calc(100% – 20px); padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em; box-sizing: border-box; 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: #777; margin-top: 5px; display: block; } .input-group .error-message { color: #dc3545; font-size: 0.8em; margin-top: 5px; display: none; font-weight: bold; } .button-group { display: flex; justify-content: space-between; margin-top: 25px; flex-wrap: wrap; gap: 10px; } .button-group button { padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease, transform 0.2s ease; flex: 1; min-width: 150px; } .button-group button:hover { transform: translateY(-2px); } .btn-calculate { background-color: #004a99; color: white; } .btn-calculate:hover { background-color: #003366; } .btn-reset { background-color: #6c757d; color: white; } .btn-reset:hover { background-color: #5a6268; } .btn-copy { background-color: #28a745; color: white; } .btn-copy:hover { background-color: #218838; } #results { margin-top: 30px; padding: 25px; background-color: #e9ecef; border-radius: 8px; border: 1px solid #dee2e6; width: 100%; box-sizing: border-box; text-align: center; } #results h3 { color: #004a99; margin-bottom: 20px; } .result-item { margin-bottom: 15px; font-size: 1.1em; } .result-item strong { color: #004a99; min-width: 200px; display: inline-block; } .primary-result { font-size: 1.8em; font-weight: bold; color: #004a99; background-color: #fff3cd; padding: 15px 25px; border-radius: 5px; margin-top: 10px; display: inline-block; border: 2px solid #ffeeba; } .formula-explanation { font-size: 0.9em; color: #555; margin-top: 20px; padding: 15px; background-color: #f1f1f1; border-radius: 5px; text-align: left; } .chart-container { width: 100%; margin-top: 30px; padding: 25px; background-color: #fff; border-radius: 8px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); border: 1px solid #e0e0e0; } .chart-container h3 { color: #004a99; text-align: center; margin-bottom: 20px; } canvas { display: block; margin: 0 auto; max-width: 100%; height: auto !important; } .table-container { width: 100%; margin-top: 30px; overflow-x: auto; } .table-container h3 { color: #004a99; text-align: center; margin-bottom: 20px; } table { width: 100%; border-collapse: collapse; margin-top: 15px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); } th, td { padding: 12px 15px; text-align: left; border: 1px solid #ddd; } thead { background-color: #004a99; color: white; } tbody tr:nth-child(even) { background-color: #f2f2f2; } tbody tr:hover { background-color: #e2e2e2; } .article-section { margin-top: 40px; padding: 30px; background-color: #fff; border-radius: 8px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); border: 1px solid #e0e0e0; } .article-section h2 { color: #004a99; margin-bottom: 20px; border-bottom: 2px solid #004a99; padding-bottom: 10px; } .article-section h3 { color: #004a99; margin-top: 25px; margin-bottom: 15px; } .article-section p, .article-section ul, .article-section ol { margin-bottom: 15px; font-size: 1.05em; } .article-section ul, .article-section ol { padding-left: 25px; } .article-section li { margin-bottom: 10px; } .faq-item { margin-bottom: 15px; } .faq-item strong { color: #004a99; display: block; margin-bottom: 5px; } .internal-links { margin-top: 30px; padding: 25px; background-color: #e9ecef; border-radius: 8px; border: 1px solid #dee2e6; } .internal-links h3 { color: #004a99; margin-bottom: 20px; text-align: center; } .internal-links ul { list-style: none; padding: 0; text-align: center; } .internal-links li { margin-bottom: 10px; } .internal-links a { color: #004a99; text-decoration: none; font-weight: bold; } .internal-links a:hover { text-decoration: underline; } .internal-links p { font-size: 0.9em; color: #555; margin-top: 5px; } @media (max-width: 768px) { .container { margin: 10px; padding: 15px; } .button-group button { flex: 1 1 100%; min-width: unset; } }

ASC 842 Weighted-Average Discount Rate Calculator

Accurately determine the weighted-average discount rate required for ASC 842 lease accounting. This tool helps simplify complex calculations for lessees and lessors.

Weighted-Average Discount Rate Calculator

The current yield on a U.S. Treasury security with a maturity matching the lease term.
The additional yield your company would pay over the risk-free rate.
The total duration of the lease agreement.
The expected average annual inflation rate over the lease term.
The sum of all payments over the lease term.
The expected value of the asset at the end of the lease term.
Incremental Borrowing Rate Implicit Rate (if readily determinable) Choose the method for determining the discount rate.

Calculation Results

Weighted-Average Discount Rate:
Incremental Borrowing Rate:
Effective Discount Rate:
Present Value of Lease Payments:
Formula Used: The weighted-average discount rate is typically derived from the company's incremental borrowing rate, which is the risk-free rate plus the company's credit spread. For ASC 842, this rate is used to discount future lease payments and residual values to their present value. The calculation involves determining the appropriate incremental borrowing rate based on market conditions and the lessee's creditworthiness.

Discount Rate Components Over Time

Visualizing the components contributing to the discount rate.

Lease Payment Present Value Breakdown

Period Lease Payment Discount Factor Present Value
Enter inputs and click Calculate to see breakdown.

What is ASC 842 Weighted-Average Discount Rate Calculation?

The ASC 842 weighted-average discount rate calculation is a critical component of lease accounting under the new lease accounting standards (ASC 842). It represents the rate used to discount future lease payments and any residual value guarantees to their present value. This calculation is essential for lessees to recognize a right-of-use (ROU) asset and a lease liability on their balance sheets. For lessors, it's crucial for classifying leases and recognizing revenue. The weighted-average nature implies that the rate reflects an average cost of borrowing or an expected rate of return over the lease term, considering various risk factors.

Who should use it: This calculation is primarily for entities that enter into lease agreements, specifically lessees. It's also relevant for lessors when determining lease classification and for auditors and financial analysts assessing the accuracy of lease accounting. Understanding the ASC 842 weighted-average discount rate calculation is vital for finance professionals, accountants, and business owners involved in financial reporting.

Common misconceptions: A common misconception is that the discount rate is simply the interest rate stated in the lease contract. However, ASC 842 requires using the rate implicit in the lease if it can be readily determined. If not, the lessee must use their incremental borrowing rate. Another misconception is that a single, static rate applies to all leases; the rate must be specific to the lease term and the lessee's creditworthiness.

ASC 842 Weighted-Average Discount Rate Calculation Formula and Mathematical Explanation

The core principle behind the ASC 842 weighted-average discount rate calculation is to determine the appropriate rate to discount future cash flows associated with a lease. While there isn't a single, complex formula for the "weighted-average discount rate" itself, the process involves identifying the correct rate to use in present value calculations.

Determining the Discount Rate

Under ASC 842, lessees must use the rate implicit in the lease if it is readily determinable. The rate implicit in the lease is the discount rate that produces a present value of the lease payments and any residual value guarantee equal to the fair value of the underlying asset plus any initial direct costs of the lessor. However, this is often difficult for lessees to ascertain.

Therefore, if the rate implicit in the lease is not readily determinable, lessees must use their incremental borrowing rate. This is the rate at which a lessee could borrow funds on a collateralized basis over a similar term, in an amount equal to the lease payments and liability, in the same economic environment.

The incremental borrowing rate is typically calculated as:

Incremental Borrowing Rate = Risk-Free Rate + Company Credit Spread

The "weighted-average" aspect often comes into play when considering the average cost of funds over the lease term or when different borrowing facilities might be used. However, for practical application under ASC 842, the focus is on using a single, appropriate incremental borrowing rate or the implicit rate.

Present Value Calculation

Once the appropriate discount rate (let's call it 'r') is determined, it's used to calculate the present value (PV) of the lease payments (LP) and residual value (RV) over the lease term (n):

PV = Σ [ LPt / (1 + r)t ] + [ RV / (1 + r)n ]

Where:

  • LPt is the lease payment in period t
  • RV is the residual value at the end of the lease term
  • r is the discount rate (incremental borrowing rate or implicit rate)
  • t is the period number (from 1 to n)
  • n is the total number of periods (lease term)

The calculator above primarily focuses on determining the incremental borrowing rate and then uses it to calculate the present value of lease payments. The weighted-average concept is embedded in the idea that the incremental borrowing rate reflects the company's average cost of debt over the lease term.

Variables Table

Variable Meaning Unit Typical Range
Risk-Free Rate (Rf) Yield on government debt matching lease term % 1% – 5%
Company Credit Spread (CS) Additional yield based on creditworthiness % 0.5% – 5%+
Incremental Borrowing Rate (IBR) Rf + CS % 1.5% – 10%+
Lease Term (n) Duration of the lease Years 1 – 30+ Years
Lease Payments (LP) Periodic payments made by lessee Currency Unit Varies widely
Residual Value (RV) Estimated value at lease end Currency Unit 0 – Significant % of asset value
Discount Rate (r) IBR or Implicit Rate % IBR or Implicit Rate
Present Value (PV) Discounted value of future cash flows Currency Unit Varies widely
Inflation Expectation Anticipated inflation rate % 1% – 4%

Practical Examples (Real-World Use Cases)

The ASC 842 weighted-average discount rate calculation is crucial for accurate financial reporting. Here are two practical examples:

Example 1: Standard Lease for a Growing Tech Company

Scenario: A rapidly growing tech company signs a 5-year lease for new office equipment. The company does not know the implicit rate and must use its incremental borrowing rate. Its credit rating is considered moderate.

Inputs:

  • Risk-Free Rate: 3.50%
  • Company Credit Spread: 2.50%
  • Lease Term: 5 Years
  • Total Lease Payments: $200,000 ($40,000 per year)
  • Estimated Residual Value: $15,000
  • Inflation Expectation: 2.00%

Calculation Steps:

  1. Determine Incremental Borrowing Rate: 3.50% (Risk-Free Rate) + 2.50% (Credit Spread) = 6.00%
  2. Use as Discount Rate: The calculator uses 6.00% as the discount rate.
  3. Calculate Present Value of Lease Payments: Using the calculator or financial functions, the PV of $40,000 annually for 5 years at 6.00% is approximately $169,971.
  4. Calculate Present Value of Residual Value: $15,000 / (1 + 0.06)5 ≈ $11,215
  5. Total PV: $169,971 + $11,215 = $181,186

Result: The weighted-average discount rate (effectively the incremental borrowing rate) is 6.00%. The ROU asset and lease liability recognized would be approximately $181,186.

Financial Interpretation: This rate reflects the company's cost of borrowing for this specific lease. A higher credit spread would increase this rate, reducing the present value and thus the initial ROU asset and liability.

Example 2: Mature Manufacturing Firm with a Long-Term Lease

Scenario: A stable manufacturing company enters into a 10-year lease for heavy machinery. They have a strong credit rating and can borrow at favorable rates.

Inputs:

  • Risk-Free Rate: 3.25%
  • Company Credit Spread: 1.25%
  • Lease Term: 10 Years
  • Total Lease Payments: $500,000 ($50,000 per year)
  • Estimated Residual Value: $50,000
  • Inflation Expectation: 2.25%

Calculation Steps:

  1. Determine Incremental Borrowing Rate: 3.25% (Risk-Free Rate) + 1.25% (Credit Spread) = 4.50%
  2. Use as Discount Rate: The calculator uses 4.50% as the discount rate.
  3. Calculate Present Value of Lease Payments: Using the calculator or financial functions, the PV of $50,000 annually for 10 years at 4.50% is approximately $399,455.
  4. Calculate Present Value of Residual Value: $50,000 / (1 + 0.045)10 ≈ $32,564
  5. Total PV: $399,455 + $32,564 = $432,019

Result: The weighted-average discount rate (incremental borrowing rate) is 4.50%. The initial ROU asset and lease liability would be approximately $432,019.

Financial Interpretation: The lower discount rate compared to Example 1 results in a higher present value. This highlights how a stronger credit profile significantly impacts lease accounting figures under ASC 842. This is a key aspect of the ASC 842 weighted-average discount rate calculation.

How to Use This ASC 842 Weighted-Average Discount Rate Calculator

Our calculator is designed for ease of use, providing quick and accurate results for your lease accounting needs. Follow these simple steps:

  1. Input Lease Details: Enter the required information into the fields provided. This includes the current Risk-Free Rate, your Company Credit Spread, the Lease Term in years, expected Inflation, Total Lease Payments, and the Estimated Residual Value.
  2. Select Discount Rate Method: Choose whether you are using the Incremental Borrowing Rate (most common for lessees) or the Implicit Rate (if known).
  3. Click Calculate: Once all inputs are entered, click the "Calculate Rate" button.

How to Read Results:

  • Weighted-Average Discount Rate: This is the primary output, representing the rate used for present value calculations. It will typically be your Incremental Borrowing Rate unless you select the Implicit Rate option.
  • Incremental Borrowing Rate: This shows the calculated rate based on the Risk-Free Rate and your Company Credit Spread.
  • Effective Discount Rate: This confirms the rate being applied in the PV calculations.
  • Present Value of Lease Payments: This is the calculated net present value of all future lease payments.
  • Breakdown Table: The table provides a period-by-period view of the lease payments, the corresponding discount factor for each period, and the resulting present value.
  • Chart: The chart visually represents the components contributing to the discount rate, offering a quick overview.

Decision-Making Guidance:

The results from this calculator help you:

  • Recognize Lease Liabilities and ROU Assets: The calculated Present Value is the basis for these balance sheet entries.
  • Assess Lease Economics: Understand the time value of money impact on your lease obligations.
  • Compare Financing Options: Evaluate the cost of leasing versus purchasing or other financing methods.
  • Ensure Compliance: Meet the requirements of ASC 842 for accurate lease accounting.

Remember to use inputs that reflect current market conditions and your company's specific financial situation for the most accurate ASC 842 weighted-average discount rate calculation.

Key Factors That Affect ASC 842 Weighted-Average Discount Rate Results

Several factors significantly influence the outcome of the ASC 842 weighted-average discount rate calculation and the resulting present value of lease obligations. Understanding these is key to accurate financial reporting:

  1. Risk-Free Rate: This is the foundational element. It's influenced by macroeconomic factors, central bank policies (like Federal Reserve interest rate decisions), and overall economic stability. Higher risk-free rates directly increase the discount rate and decrease the present value of lease payments. This is a critical input for the ASC 842 weighted-average discount rate calculation.
  2. Company Creditworthiness (Credit Spread): A company's financial health, profitability, leverage, and industry outlook determine its credit spread. A lower credit spread (indicating higher creditworthiness) leads to a lower discount rate and a higher present value. Conversely, a higher credit spread increases the discount rate and reduces the PV.
  3. Lease Term: Longer lease terms generally expose the lessee to more uncertainty and interest rate risk. Lenders may demand higher rates for longer commitments. Therefore, longer lease terms often correlate with higher discount rates, reducing the present value of the total lease payments.
  4. Market Conditions and Economic Outlook: Broader economic factors, including inflation expectations, geopolitical events, and overall market sentiment, influence both risk-free rates and credit spreads. A pessimistic outlook might lead to higher rates.
  5. Inflation Expectations: While often implicitly included in the risk-free rate and credit spread, explicit consideration of inflation expectations can affect the perceived real return required by lenders or the lessor. Higher inflation expectations can push nominal rates higher.
  6. Residual Value Guarantees: If a lease includes a residual value guarantee, the uncertainty surrounding that future value impacts the discount rate. A higher or more uncertain residual value might necessitate a higher discount rate to compensate for the risk.
  7. Lease Payments Structure: While the calculator assumes constant payments for simplicity, variable payments or payments skewed towards later periods can affect the effective weighted average. However, the primary driver remains the chosen discount rate.
  8. Initial Direct Costs (for Lessors): While lessors determine the implicit rate, their initial direct costs associated with originating the lease are factored into that rate. These costs increase the effective yield required by the lessor.

Frequently Asked Questions (FAQ)

Q1: What is the difference between the implicit rate and the incremental borrowing rate under ASC 842?

A1: The implicit rate is the discount rate that equates the present value of the lease payments and residual value to the fair value of the asset plus lessor's initial direct costs. The incremental borrowing rate is the rate at which the lessee could borrow funds on a collateralized basis over a similar term. Lessees use the implicit rate if readily determinable; otherwise, they use the incremental borrowing rate.

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

A2: Potentially, but it must meet the criteria of an incremental borrowing rate. It should reflect the rate at which you could borrow funds *on a collateralized basis* for a term similar to the lease. A general, unsecured line of credit rate might not be appropriate if it doesn't meet these specific conditions.

Q3: How often should the discount rate be reassessed?

A3: The discount rate is determined at the lease commencement date and is generally fixed for the term of the lease unless the lease is modified. Reassessment is typically required only upon specific lease modifications that are treated as new leases.

Q4: What if the lease term is very long (e.g., 20 years)?

A4: For long-term leases, the risk-free rate component should correspond to the yield on government debt with a maturity matching the lease term. Longer terms generally increase uncertainty, potentially leading to higher credit spreads and thus higher discount rates.

Q5: Does inflation directly impact the discount rate calculation?

A5: Inflation is indirectly factored into both the risk-free rate (which includes an inflation premium) and the credit spread. While not always a separate input for the core rate calculation, understanding inflation expectations is crucial for setting appropriate risk premiums.

Q6: What is the impact of a higher discount rate on the balance sheet?

A6: A higher discount rate reduces the present value of future lease payments. This results in a lower initial lease liability and a lower right-of-use (ROU) asset on the balance sheet.

Q7: How does the "weighted-average" aspect apply if I use a single incremental borrowing rate?

A7: The term "weighted-average" often refers to the concept that the incremental borrowing rate represents the company's average cost of securing funds over the lease term, considering its overall credit profile. While a single rate is applied, it's intended to reflect this blended cost.

Q8: Can I use the calculator for sale-leaseback transactions?

A8: While this calculator focuses on the discount rate for standard leases, the principles of determining an appropriate discount rate (often based on the buyer-lessor's perspective or the seller-lessee's incremental borrowing rate) are relevant. However, sale-leaseback accounting has specific rules that may require additional considerations.

© 2023 Your Company Name. All rights reserved.

function validateInput(id, min, max, isRequired = true) { var input = document.getElementById(id); var errorElement = document.getElementById(id + 'Error'); var value = parseFloat(input.value); if (isRequired && (input.value === null || input.value.trim() === "")) { errorElement.textContent = "This field is required."; errorElement.style.display = 'block'; input.style.borderColor = '#dc3545'; return false; } else if (!isNaN(value)) { if (min !== null && value max) { errorElement.textContent = "Value cannot be greater than " + max + "."; errorElement.style.display = 'block'; input.style.borderColor = '#dc3545'; return false; } } else if (isRequired) { errorElement.textContent = "Please enter a valid number."; errorElement.style.display = 'block'; input.style.borderColor = '#dc3545'; return false; } errorElement.textContent = ""; errorElement.style.display = 'none'; input.style.borderColor = '#ccc'; return true; } function calculateDiscountRate() { var isValid = true; isValid &= validateInput('riskFreeRate', 0); isValid &= validateInput('creditSpread', 0); isValid &= validateInput('leaseTermYears', 1); isValid &= validateInput('inflationExpectation', 0); isValid &= validateInput('leasePayments', 0); isValid &= validateInput('residualValue', 0); if (!isValid) { document.getElementById('weightedAvgDiscountRate').textContent = "Invalid Input"; document.getElementById('incrementalBorrowingRate').textContent = "Invalid Input"; document.getElementById('effectiveDiscountRate').textContent = "Invalid Input"; document.getElementById('pvLeasePayments').textContent = "Invalid Input"; clearTable(); updateChart([], []); return; } var riskFreeRate = parseFloat(document.getElementById('riskFreeRate').value) / 100; var creditSpread = parseFloat(document.getElementById('creditSpread').value) / 100; var leaseTermYears = parseInt(document.getElementById('leaseTermYears').value); var inflationExpectation = parseFloat(document.getElementById('inflationExpectation').value) / 100; var leasePayments = parseFloat(document.getElementById('leasePayments').value); var residualValue = parseFloat(document.getElementById('residualValue').value); var discountRateMethod = document.getElementById('discountRateMethod').value; var incrementalBorrowingRate = riskFreeRate + creditSpread; var effectiveDiscountRate = incrementalBorrowingRate; // Default to IBR if (discountRateMethod === 'implicitRate') { // In a real scenario, implicit rate calculation is complex and iterative. // For this calculator, we'll assume if 'implicitRate' is chosen, // the user might have a specific rate in mind or it's provided elsewhere. // We'll use a placeholder or prompt for it if needed. // For simplicity here, we'll stick with IBR unless a specific implicit rate input is added. // If an implicit rate input were present, it would override effectiveDiscountRate. // For now, we'll just display the IBR and note the method. // effectiveDiscountRate = implicitRateValue; // hypothetical } var weightedAvgDiscountRate = effectiveDiscountRate; // For ASC 842, IBR is often the rate used. var pvLeasePayments = 0; var pvTableData = []; var chartDataRates = []; var chartDataPVs = []; for (var t = 1; t 0 ? leaseTermYears : 1; var labels = []; for (var i = 1; i <= maxPeriod; i++) { labels.push('Year ' + i); } var datasets = [ { label: 'Discount Rate (%)', data: ratesData, borderColor: '#004a99', backgroundColor: 'rgba(0, 74, 153, 0.1)', fill: false, yAxisID: 'y-axis-rate', tension: 0.1 }, { label: 'Period PV (Currency Unit)', data: pvsData, borderColor: '#28a745', backgroundColor: 'rgba(40, 167, 69, 0.1)', fill: false, yAxisID: 'y-axis-pv', tension: 0.1 } ]; window.myChart = new Chart(ctx, { type: 'line', data: { labels: labels, datasets: datasets }, options: { responsive: true, maintainAspectRatio: true, scales: { x: { title: { display: true, text: 'Lease Term (Years)' } }, 'y-axis-rate': { type: 'linear', position: 'left', title: { display: true, text: 'Discount Rate (%)' }, ticks: { callback: function(value) { return value + '%'; } }, grid: { drawOnChartArea: false, // Only draw grid for the primary y-axis } }, 'y-axis-pv': { type: 'linear', position: 'right', title: { display: true, text: 'Present Value (Currency Unit)' }, grid: { color: 'rgba(0, 0, 0, 0.05)', } } }, plugins: { tooltip: { mode: 'index', intersect: false, }, legend: { position: 'top', } }, hover: { mode: 'nearest', intersect: true } } }); } function resetCalculator() { document.getElementById('riskFreeRate').value = "3.0"; document.getElementById('creditSpread').value = "2.0"; document.getElementById('leaseTermYears').value = "5"; document.getElementById('inflationExpectation').value = "2.5"; document.getElementById('leasePayments').value = "100000"; document.getElementById('residualValue').value = "10000"; document.getElementById('discountRateMethod').value = "incrementalBorrowingRate"; document.getElementById('riskFreeRateError').textContent = ""; document.getElementById('creditSpreadError').textContent = ""; document.getElementById('leaseTermYearsError').textContent = ""; document.getElementById('inflationExpectationError').textContent = ""; document.getElementById('leasePaymentsError').textContent = ""; document.getElementById('residualValueError').textContent = ""; document.getElementById('riskFreeRate').style.borderColor = '#ccc'; document.getElementById('creditSpread').style.borderColor = '#ccc'; document.getElementById('leaseTermYears').style.borderColor = '#ccc'; document.getElementById('inflationExpectation').style.borderColor = '#ccc'; document.getElementById('leasePayments').style.borderColor = '#ccc'; document.getElementById('residualValue').style.borderColor = '#ccc'; calculateDiscountRate(); // Recalculate with default values } function copyResults() { var weightedAvgRate = document.getElementById('weightedAvgDiscountRate').textContent; var incrementalRate = document.getElementById('incrementalBorrowingRate').textContent; var effectiveRate = document.getElementById('effectiveDiscountRate').textContent; var pvPayments = document.getElementById('pvLeasePayments').textContent; var assumptions = "Key Assumptions:\n"; assumptions += "- Risk-Free Rate: " + document.getElementById('riskFreeRate').value + "%\n"; assumptions += "- Company Credit Spread: " + document.getElementById('creditSpread').value + "%\n"; assumptions += "- Lease Term: " + document.getElementById('leaseTermYears').value + " years\n"; assumptions += "- Inflation Expectation: " + document.getElementById('inflationExpectation').value + "%\n"; assumptions += "- Total Lease Payments: " + parseFloat(document.getElementById('leasePayments').value).toLocaleString() + "\n"; assumptions += "- Residual Value: " + parseFloat(document.getElementById('residualValue').value).toLocaleString() + "\n"; assumptions += "- Discount Rate Method: " + document.getElementById('discountRateMethod').options[document.getElementById('discountRateMethod').selectedIndex].text + "\n"; var tableRows = document.getElementById('pvTableBody').rows; var tableContent = "Lease Payment PV Breakdown:\n"; for (var i = 0; i < tableRows.length; i++) { var cells = tableRows[i].cells; if (cells.length === 4) { tableContent += cells[0].textContent + "\t" + cells[1].textContent + "\t" + cells[2].textContent + "\t" + cells[3].textContent + "\n"; } } var textToCopy = "ASC 842 Weighted-Average Discount Rate Calculation Results:\n\n" + "Weighted-Average Discount Rate: " + weightedAvgRate + "\n" + "Incremental Borrowing Rate: " + incrementalRate + "\n" + "Effective Discount Rate: " + effectiveRate + "\n" + "Present Value of Lease Payments: " + pvPayments + "\n\n" + assumptions + "\n\n" + tableContent; navigator.clipboard.writeText(textToCopy).then(function() { alert('Results copied to clipboard!'); }).catch(function(err) { console.error('Failed to copy results: ', err); alert('Failed to copy results. Please copy manually.'); }); } // Initial calculation on page load document.addEventListener('DOMContentLoaded', function() { calculateDiscountRate(); // Ensure chart is initialized even if no data yet updateChart([], []); });

Leave a Comment