Ny Executor Fee Calculator

NY Executor Fee Calculator – Calculate Surrogate Fees in New York :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ccc; –card-background: #fff; –shadow: 0 2px 5px rgba(0,0,0,0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; } .container { max-width: 1000px; margin: 20px auto; padding: 20px; background-color: var(–card-background); border-radius: 8px; box-shadow: var(–shadow); } header { background-color: var(–primary-color); color: white; padding: 20px 0; text-align: center; margin-bottom: 20px; border-radius: 8px 8px 0 0; } header h1 { margin: 0; font-size: 2.2em; } .calculator-section { margin-bottom: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .calculator-section h2 { color: var(–primary-color); margin-top: 0; text-align: center; margin-bottom: 25px; } .loan-calc-container { display: flex; flex-wrap: wrap; gap: 20px; } .input-group { flex: 1 1 100%; margin-bottom: 15px; display: flex; flex-direction: column; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(–primary-color); } .input-group input[type="number"], .input-group input[type="text"], .input-group select { width: 100%; padding: 10px; border: 1px solid var(–border-color); border-radius: 4px; box-sizing: border-box; font-size: 1em; } .input-group input[type="number"]:focus, .input-group input[type="text"]:focus, .input-group select:focus { border-color: var(–primary-color); outline: none; box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2); } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; } .input-group .error-message { color: red; font-size: 0.8em; margin-top: 5px; min-height: 1.2em; /* Prevent layout shift */ } .button-group { display: flex; gap: 10px; margin-top: 20px; justify-content: center; flex-wrap: wrap; } button { padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease; } .btn-primary { background-color: var(–primary-color); color: white; } .btn-primary:hover { background-color: #003366; } .btn-secondary { background-color: #6c757d; color: white; } .btn-secondary:hover { background-color: #5a6268; } .btn-success { background-color: var(–success-color); color: white; } .btn-success:hover { background-color: #218838; } #results { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); text-align: center; } #results h3 { color: var(–primary-color); margin-top: 0; margin-bottom: 20px; } .result-item { margin-bottom: 15px; padding: 10px; border-radius: 4px; } .result-item.main-result { background-color: var(–success-color); color: white; font-size: 1.8em; font-weight: bold; padding: 15px; } .result-item span { display: block; font-size: 0.9em; color: rgba(255, 255, 255, 0.8); margin-top: 5px; } .intermediate-results .result-item { background-color: #e9ecef; color: var(–text-color); font-size: 1.2em; font-weight: bold; } .intermediate-results .result-item span { color: #555; font-size: 0.8em; } .formula-explanation { font-size: 0.9em; color: #555; margin-top: 20px; text-align: left; padding: 10px; background-color: #f0f0f0; border-left: 4px solid var(–primary-color); } table { width: 100%; border-collapse: collapse; margin-top: 20px; margin-bottom: 20px; } th, td { padding: 10px; border: 1px solid var(–border-color); text-align: left; } th { background-color: var(–primary-color); color: white; } tbody tr:nth-child(even) { background-color: #f2f2f2; } caption { font-size: 1.1em; font-weight: bold; color: var(–primary-color); margin-bottom: 10px; caption-side: top; text-align: left; } #chartContainer { text-align: center; margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } #chartContainer canvas { max-width: 100%; height: auto; } .article-content { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .article-content h2, .article-content h3 { color: var(–primary-color); margin-top: 25px; margin-bottom: 15px; } .article-content h2 { font-size: 1.8em; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } .article-content h3 { font-size: 1.4em; } .article-content p { margin-bottom: 15px; } .article-content ul, .article-content ol { margin-left: 20px; margin-bottom: 15px; } .article-content li { margin-bottom: 8px; } .faq-item { margin-bottom: 15px; padding: 10px; border-left: 3px solid var(–primary-color); background-color: #f0f0f0; border-radius: 4px; } .faq-item strong { color: var(–primary-color); display: block; margin-bottom: 5px; } .internal-links { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .internal-links h3 { color: var(–primary-color); margin-top: 0; margin-bottom: 20px; } .internal-links ul { list-style: none; padding: 0; } .internal-links li { margin-bottom: 10px; } .internal-links a { color: var(–primary-color); 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 (min-width: 768px) { .input-group { flex: 1 1 calc(50% – 10px); } .loan-calc-container { justify-content: center; } } @media (min-width: 992px) { .input-group { flex: 1 1 calc(33.333% – 13.33px); } }

NY Executor Fee Calculator

Calculate Surrogate's Court Commission for Estate Executors in New York

Executor Fee Calculator

Enter the total value of the estate before any deductions or debts.
Enter the value of real property included in the gross estate.
Enter the total value of specific items or sums of money given to individuals.

Calculation Results

$0.00 Estimated Executor Commission
$0.00 Commission on First $100,000
$0.00 Commission on Remaining Value
$0.00 Total Commissionable Estate Value
Formula Used: New York Surrogate's Court Procedure Act (SCPA) § 2307 outlines executor commissions. For estates over $100,000, the commission is calculated on the gross estate value, less specific bequests, and less the value of real property if distributed to specific beneficiaries. The rates are tiered: 5% on the first $100,000, 4% on the next $200,000, 3% on the next $700,000, 2.5% on the next $4,000,000, and 2% on any amount over $5,000,000. This calculator uses the simplified tiered rates for estates up to $5,000,000.
Executor Commission vs. Estate Value
Estate Value Tier Commission Rate Calculated Commission
First $100,000 5.0%
Next $200,000 ($100,001 – $300,000) 4.0%
Next $700,000 ($300,001 – $1,000,000) 3.0%
Next $4,000,000 ($1,000,001 – $5,000,000) 2.5%
Over $5,000,000 2.0%

What is a NY Executor Fee?

{primary_keyword} refers to the statutory commission that an executor can claim for managing and settling an estate in New York State. Executors are fiduciaries responsible for a deceased person's assets, including gathering property, paying debts and taxes, and distributing the remaining assets to beneficiaries according to the will or intestacy laws. New York law, specifically Surrogate's Court Procedure Act (SCPA) § 2307, provides a framework for calculating these fees, ensuring executors are compensated for their time, effort, and responsibility. This compensation is often referred to as "statutory commission" or "surrogate's commission."

Who Should Use This Calculator:

  • Individuals appointed as executors in New York wills.
  • Co-executors who need to understand their respective shares of the commission.
  • Beneficiaries seeking to understand estate administration costs.
  • Estate planning attorneys and paralegals.
  • Anyone involved in the probate process in New York.

Common Misconceptions:

  • Executors are automatically entitled to the maximum fee: While SCPA § 2307 provides statutory rates, executors can waive their commission, or the court may reduce it for misconduct or failure to perform duties diligently.
  • Fees are based on the net estate: The statutory commission is generally calculated on the *gross* value of the estate, with specific deductions allowed for certain assets like specific bequests and real property distributed to named beneficiaries.
  • Executors can charge hourly rates: Unless explicitly permitted by the will or court order, executors are generally limited to the statutory commission, not an hourly billing rate.
  • Fees are paid immediately: Commissions are typically paid only after the estate has been administered and accounted for, often requiring court approval.

NY Executor Fee Formula and Mathematical Explanation

The calculation of {primary_keyword} is governed by SCPA § 2307, which establishes tiered commission rates based on the value of the estate. The commission is calculated on the value of the assets that come into the executor's hands and are accounted for. Certain assets may be excluded from the commissionable base.

Commissionable Estate Value

The starting point is the Gross Estate Value. From this, certain items are deducted to arrive at the Commissionable Estate Value:

  • Specific Bequests: The value of any specific items (e.g., jewelry, art) or sums of money bequeathed to named individuals are generally not included in the commissionable base.
  • Real Property Distributed to Specific Beneficiaries: If the will directs that real property be distributed to specific individuals, its value may be excluded from the commissionable base. However, if the real property is sold by the executor to pay debts or is part of the residuary estate, its value is typically included.

Commissionable Estate Value = Gross Estate Value – Value of Specific Bequests – Value of Real Property (if applicable and distributed to specific beneficiaries)

Statutory Commission Rates (SCPA § 2307)

Once the commissionable estate value is determined, the statutory rates are applied in tiers:

  • 5% on the first $100,000
  • 4% on the next $200,000 (from $100,001 to $300,000)
  • 3% on the next $700,000 (from $300,001 to $1,000,000)
  • 2.5% on the next $4,000,000 (from $1,000,001 to $5,000,000)
  • 2% on any amount over $5,000,000

Calculation Steps:

  1. Determine the Gross Estate Value.
  2. Subtract the value of any specific bequests.
  3. Subtract the value of any real property distributed to specific beneficiaries (if applicable). This gives the Commissionable Estate Value.
  4. Apply the tiered commission rates to the Commissionable Estate Value.
  5. Sum the commissions calculated for each tier to get the Total Executor Commission.

Variables Table

Variable Meaning Unit Typical Range
Gross Estate Value Total value of all assets owned by the decedent at death. USD ($) $10,000 – $10,000,000+
Value of Specific Bequests Value of assets given to specific individuals. USD ($) $0 – $1,000,000+
Value of Real Property Market value of real estate owned by the decedent. USD ($) $0 – $5,000,000+
Commissionable Estate Value Gross Estate Value less allowable deductions for bequests/property. USD ($) $0 – $10,000,000+
Executor Commission Statutory compensation for the executor's services. USD ($) $0 – $100,000+

Practical Examples (Real-World Use Cases)

Example 1: Modest Estate with Real Property

John Doe passed away in New York, leaving a will. His executor, Jane, is tasked with settling his estate. The estate's gross value is $600,000. This includes a primary residence valued at $450,000, which the will directs to be given to John's son, Mark. John also left a specific cash bequest of $20,000 to his niece.

  • Gross Estate Value: $600,000
  • Value of Specific Bequests: $20,000 (cash to niece)
  • Value of Real Property Distributed to Specific Beneficiary: $450,000 (residence to Mark)
  • Commissionable Estate Value: $600,000 – $20,000 – $450,000 = $130,000

Commission Calculation:

  • On the first $100,000: 5% of $100,000 = $5,000
  • On the remaining $30,000 ($130,000 – $100,000): 4% of $30,000 = $1,200
  • Total Executor Commission: $5,000 + $1,200 = $6,200

Interpretation: Jane, the executor, can claim a statutory commission of $6,200 for her services in managing this estate, based on the commissionable value of $130,000.

Example 2: Larger Estate with No Specific Bequests or Real Property Distribution

Sarah Smith died leaving an estate valued at $2,500,000. Her will directs that the entire estate be divided equally among her three children (residuary beneficiaries). There are no specific cash bequests or real property designated for specific individuals.

  • Gross Estate Value: $2,500,000
  • Value of Specific Bequests: $0
  • Value of Real Property Distributed to Specific Beneficiary: $0 (The estate's assets, including any real property, will be part of the residuary estate to be divided.)
  • Commissionable Estate Value: $2,500,000 – $0 – $0 = $2,500,000

Commission Calculation:

  • On the first $100,000: 5% of $100,000 = $5,000
  • On the next $200,000 ($100,001 – $300,000): 4% of $200,000 = $8,000
  • On the next $700,000 ($300,001 – $1,000,000): 3% of $700,000 = $21,000
  • On the remaining $1,500,000 ($1,000,001 – $2,500,000): 2.5% of $1,500,000 = $37,500
  • Total Executor Commission: $5,000 + $8,000 + $21,000 + $37,500 = $71,500

Interpretation: Sarah's executor can claim a statutory commission of $71,500 for managing the $2,500,000 estate. If there were multiple executors, this amount would typically be divided among them based on their services, up to the total statutory amount.

How to Use This NY Executor Fee Calculator

Our {primary_keyword} calculator is designed for simplicity and accuracy. Follow these steps to estimate the executor's commission:

  1. Enter Gross Estate Value: Input the total value of all assets the decedent owned at the time of death. This includes bank accounts, investments, real estate, personal property, etc.
  2. Enter Value of Specific Bequests: If the will leaves specific items (like a painting) or sums of money (like $10,000) to particular individuals, enter the total value here. If there are none, enter $0.
  3. Enter Value of Real Estate (if applicable): If the will specifically directs that a piece of real property be given to a named beneficiary, enter its value here. If the property is to be sold and the proceeds distributed, or if it's part of the general estate, this value might not be deductible for commission calculation purposes. Consult the will and legal advice. If no specific real property bequest, enter $0.
  4. Click 'Calculate Fees': The calculator will instantly display the estimated executor commission.

How to Read Results:

  • Estimated Executor Commission: This is the primary result, showing the total statutory commission the executor(s) can claim.
  • Intermediate Values: These show the commission earned on different portions of the estate value, illustrating the tiered rate structure.
  • Total Commissionable Estate Value: This crucial figure shows the base amount upon which the commission is calculated after deductions.
  • Formula Explanation: Provides a clear breakdown of the legal basis and calculation method.
  • Table & Chart: Offer visual and tabular representations of the commission breakdown across different estate value tiers.

Decision-Making Guidance: This calculator provides an estimate based on statutory guidelines. It's essential to remember that executor commissions are subject to court approval and can be waived or modified. Always consult with a qualified New York estate attorney for advice specific to your situation, especially regarding the interpretation of the will and the correct calculation of the commissionable estate value.

Key Factors That Affect NY Executor Fee Results

Several factors influence the final {primary_keyword} calculation and the executor's actual compensation:

  1. Will Provisions: The decedent's will is paramount. It might explicitly state that the executor should receive no commission, or it could grant specific compensation arrangements (though statutory fees often prevail unless clearly waived).
  2. Gross Estate Value: This is the primary driver. Higher gross estate values lead to higher potential commissions due to the tiered rate structure.
  3. Specific Bequests: The presence and value of specific bequests directly reduce the commissionable estate value, thus lowering the executor's commission.
  4. Distribution of Real Property: Whether real estate is distributed directly to beneficiaries or handled as part of the general/residuary estate significantly impacts the commissionable base. This is a common area for legal interpretation.
  5. Executor Misconduct or Negligence: If an executor fails to perform their duties diligently, breaches their fiduciary duty, or engages in misconduct, the Surrogate's Court can reduce or deny their commission entirely.
  6. Multiple Executors: If an estate has more than one executor, the total statutory commission is generally divided among them based on the services rendered by each. SCPA § 2307 outlines specific rules for dividing commissions among multiple representatives.
  7. Estate Administration Complexity: While not directly altering the statutory rate, complex estates (e.g., ongoing businesses, significant litigation, international assets) require more executor effort, potentially justifying the full statutory commission.
  8. Executor's Waiver: An executor has the right to waive their commission, either partially or entirely. This might be done for tax reasons or to benefit specific beneficiaries.

Frequently Asked Questions (FAQ)

Q1: Can an executor charge fees beyond the statutory commission in New York?

A: Generally, no. Executors are typically limited to the statutory commission outlined in SCPA § 2307 unless the will provides for a different compensation method or the court authorizes additional fees for extraordinary services. However, executors can be reimbursed for reasonable expenses incurred in estate administration.

Q2: How is the commission divided if there are two executors?

A: For estates where the gross value is $100,000 or less, one commission is allowed. For estates exceeding $100,000, two executors are entitled to two full commissions if the estate value reaches $300,000 or more. If the estate value is between $100,000 and $300,000, the two executors share one commission. If there are three or more executors, they share two commissions, regardless of the estate value. The division is based on the services rendered by each executor.

Q3: When can an executor take their commission?

A: Commissions are typically paid after the estate has been administered and the executor has filed an accounting with the Surrogate's Court. The court must approve the accounting and the payment of commissions. Executors generally cannot pay themselves commissions from estate assets without court approval.

Q4: What happens if the executor is also a beneficiary?

A: An executor who is also a beneficiary is still entitled to their statutory commission, provided they fulfill their duties. The commission is calculated based on the estate value, not on the amount they inherit as a beneficiary. They receive their inheritance share plus their executor commission (subject to court approval).

Q5: Does the executor's commission need to be reported for income tax purposes?

A: Yes, executor commissions are considered taxable income to the executor. They should be reported on the executor's personal income tax return (Form 1040) for the year in which they are received.

Q6: What if the will asks the executor to serve "without compensation"?

A: If a will explicitly states that the executor should serve "without compensation" or "without fee," the executor generally must abide by this provision and cannot claim the statutory commission. Accepting the appointment may be seen as agreeing to serve without compensation.

Q7: How is the value of assets determined for commission calculation?

A: Assets are generally valued at their fair market value as of the date of the decedent's death. For certain assets, like stocks or bonds, this is straightforward. For unique items like art or real estate, appraisals may be necessary. The executor is responsible for determining these values, often with professional assistance.

Q8: Can an executor charge for legal or accounting services they provide?

A: An executor who is also an attorney or accountant cannot typically charge the estate for legal or accounting services they perform in their professional capacity, in addition to their executor commission, unless the will specifically allows it or the court approves extraordinary fees for such services. They are expected to perform basic executor duties without additional professional fees.

var ctx = null; var feeChart = null; function validateInput(id, min, max, errorId, message) { var input = document.getElementById(id); var value = parseFloat(input.value); var errorDiv = document.getElementById(errorId); errorDiv.textContent = "; // Clear previous error if (isNaN(value)) { errorDiv.textContent = 'Please enter a valid number.'; return false; } if (value max) { errorDiv.textContent = `Value cannot exceed ${max.toLocaleString()}.`; return false; } return true; } function calculateFees() { var estateValueInput = document.getElementById('estateValue'); var realEstateValueInput = document.getElementById('realEstateValue'); var specificBequestsInput = document.getElementById('specificBequests'); var estateValueError = document.getElementById('estateValueError'); var realEstateValueError = document.getElementById('realEstateValueError'); var specificBequestsError = document.getElementById('specificBequestsError'); var isValid = true; isValid = validateInput('estateValue', 0, undefined, 'estateValueError', 'Gross estate value cannot be negative.') && isValid; isValid = validateInput('realEstateValue', 0, undefined, 'realEstateValueError', 'Real estate value cannot be negative.') && isValid; isValid = validateInput('specificBequests', 0, undefined, 'specificBequestsError', 'Specific bequests value cannot be negative.') && isValid; if (!isValid) { return; } var grossEstateValue = parseFloat(estateValueInput.value); var realEstateValue = parseFloat(realEstateValueInput.value); var specificBequests = parseFloat(specificBequestsInput.value); var commissionableEstateValue = grossEstateValue – specificBequests – realEstateValue; if (commissionableEstateValue 0) { commission100k = tier1Value * 0.05; } var remainingAfter100k = commissionableEstateValue – 100000; var tier2Value = Math.min(Math.max(0, remainingAfter100k), 200000); if (tier2Value > 0) { commission200k = tier2Value * 0.04; } var remainingAfter300k = commissionableEstateValue – 300000; var tier3Value = Math.min(Math.max(0, remainingAfter300k), 700000); if (tier3Value > 0) { commission700k = tier3Value * 0.03; } var remainingAfter1M = commissionableEstateValue – 1000000; var tier4Value = Math.min(Math.max(0, remainingAfter1M), 4000000); if (tier4Value > 0) { commission4M = tier4Value * 0.025; } var remainingAfter5M = commissionableEstateValue – 5000000; if (remainingAfter5M > 0) { commissionOver5M = remainingAfter5M * 0.02; } totalCommission = commission100k + commission200k + commission700k + commission4M + commissionOver5M; document.getElementById('mainResult').innerText = '$' + totalCommission.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('mainResult').querySelector('span').innerText = 'Estimated Executor Commission'; document.getElementById('intermediateResult1').innerText = '$' + commission100k.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('intermediateResult1').querySelector('span').innerText = 'Commission on First $100,000'; document.getElementById('intermediateResult2').innerText = '$' + (totalCommission – commission100k).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('intermediateResult2').querySelector('span').innerText = 'Commission on Remaining Value'; document.getElementById('intermediateResult3').innerText = '$' + commissionableEstateValue.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('intermediateResult3').querySelector('span').innerText = 'Total Commissionable Estate Value'; // Update table document.getElementById('tableRow1').innerText = '$' + commission100k.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('tableRow2').innerText = '$' + commission200k.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('tableRow3').innerText = '$' + commission700k.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('tableRow4').innerText = '$' + commission4M.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); document.getElementById('tableRow5').innerText = '$' + commissionOver5M.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); updateChart(commissionableEstateValue, commission100k, commission200k, commission700k, commission4M, commissionOver5M); } function resetCalculator() { document.getElementById('estateValue').value = '500000'; document.getElementById('realEstateValue').value = '0'; document.getElementById('specificBequests').value = '0'; document.getElementById('estateValueError').textContent = "; document.getElementById('realEstateValueError').textContent = "; document.getElementById('specificBequestsError').textContent = "; document.getElementById('mainResult').innerText = '$0.00\nEstimated Executor Commission'; document.getElementById('intermediateResult1').innerText = '$0.00\nCommission on First $100,000'; document.getElementById('intermediateResult2').innerText = '$0.00\nCommission on Remaining Value'; document.getElementById('intermediateResult3').innerText = '$0.00\nTotal Commissionable Estate Value'; document.getElementById('tableRow1').innerText = "; document.getElementById('tableRow2').innerText = "; document.getElementById('tableRow3').innerText = "; document.getElementById('tableRow4').innerText = "; document.getElementById('tableRow5').innerText = "; if (feeChart) { feeChart.destroy(); feeChart = null; } if (ctx) { ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); } } function copyResults() { var mainResultText = document.getElementById('mainResult').innerText.split('\n')[0]; var intermediate1Text = document.getElementById('intermediateResult1').innerText.split('\n')[0]; var intermediate2Text = document.getElementById('intermediateResult2').innerText.split('\n')[0]; var intermediate3Text = document.getElementById('intermediateResult3').innerText.split('\n')[0]; var assumptions = "Key Assumptions:\n"; assumptions += "- Gross Estate Value: $" + parseFloat(document.getElementById('estateValue').value).toLocaleString() + "\n"; assumptions += "- Specific Bequests Value: $" + parseFloat(document.getElementById('specificBequests').value).toLocaleString() + "\n"; assumptions += "- Real Estate Value (Specific Bequest): $" + parseFloat(document.getElementById('realEstateValue').value).toLocaleString() + "\n"; var resultsText = "NY Executor Fee Calculation Results:\n\n"; resultsText += "Estimated Executor Commission: " + mainResultText + "\n"; resultsText += "Commission on First $100,000: " + intermediate1Text + "\n"; resultsText += "Commission on Remaining Value: " + intermediate2Text + "\n"; resultsText += "Total Commissionable Estate Value: " + intermediate3Text + "\n\n"; resultsText += assumptions; try { navigator.clipboard.writeText(resultsText).then(function() { alert('Results copied to clipboard!'); }).catch(function(err) { console.error('Failed to copy: ', err); alert('Failed to copy results. Please copy manually.'); }); } catch (e) { console.error('Clipboard API not available: ', e); alert('Clipboard API not available. Please copy results manually.'); } } function updateChart(commissionableValue, comm1, comm2, comm3, comm4, comm5) { var canvas = document.getElementById('feeChart'); if (!canvas) return; ctx = canvas.getContext('2d'); if (feeChart) { feeChart.destroy(); } // Define data points for chart segments based on tiers var dataPoints = []; var labels = []; var colors = ['#004a99', '#007bff', '#6610f2', '#6f42c1', '#d63384']; var currentVal = 0; if (comm1 > 0) { dataPoints.push(comm1); labels.push('First $100k'); currentVal += 100000; } if (comm2 > 0) { dataPoints.push(comm2); labels.push('$100k-$300k'); currentVal += 200000; } if (comm3 > 0) { dataPoints.push(comm3); labels.push('$300k-$1M'); currentVal += 700000; } if (comm4 > 0) { dataPoints.push(comm4); labels.push('$1M-$5M'); currentVal += 4000000; } if (comm5 > 0) { dataPoints.push(comm5); labels.push('Over $5M'); } // Ensure we have at least one data point if commissionableValue is 0 if (dataPoints.length === 0 && commissionableValue === 0) { dataPoints.push(0); labels.push('No Commission'); } else if (dataPoints.length === 0 && commissionableValue > 0) { // This case should ideally not happen if calculations are correct // but as a fallback, show the total commission if tiers didn't capture it dataPoints.push(totalCommission); labels.push('Total Commission'); } feeChart = new Chart(ctx, { type: 'doughnut', // Changed to doughnut for better visualization of parts of a whole data: { labels: labels, datasets: [{ label: 'Executor Commission ($)', data: dataPoints, backgroundColor: colors.slice(0, dataPoints.length), hoverOffset: 4 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'top', }, title: { display: true, text: 'Executor Commission Breakdown by Tier' } } } }); } // Initial calculation on page load document.addEventListener('DOMContentLoaded', function() { calculateFees(); // Ensure canvas context is available for chart updates var canvas = document.getElementById('feeChart'); if (canvas) { ctx = canvas.getContext('2d'); } });

Leave a Comment