Fers High 3 Calculator

FERS High-3 Calculator: Estimate Your High-3 Average

:root {
–primary-color: #004a99;
–success-color: #28a745;
–background-color: #f8f9fa;
–text-color: #333;
–border-color: #ddd;
–shadow-color: 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;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 20px;
padding-bottom: 40px;
}
.container {
width: 100%;
max-width: 960px;
background-color: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 4px 15px var(–shadow-color);
margin-bottom: 30px;
}
h1, h2, h3 {
color: var(–primary-color);
text-align: center;
margin-bottom: 20px;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.8em;
margin-top: 30px;
border-bottom: 2px solid var(–primary-color);
padding-bottom: 10px;
}
h3 {
font-size: 1.4em;
margin-top: 25px;
}
.loan-calc-container {
background-color: #f0f2f5;
padding: 25px;
border-radius: 8px;
margin-bottom: 30px;
border: 1px solid var(–border-color);
}
.input-group {
margin-bottom: 20px;
text-align: left;
}
.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: calc(100% – 22px);
padding: 12px;
border: 1px solid var(–border-color);
border-radius: 4px;
font-size: 1em;
box-sizing: border-box;
transition: border-color 0.3s ease;
}
.input-group input[type=”number”]:focus,
.input-group input[type=”text”]:focus,
.input-group select:focus {
border-color: var(–primary-color);
outline: none;
}
.input-group .helper-text {
font-size: 0.85em;
color: #666;
margin-top: 5px;
display: block;
}
.error-message {
color: #dc3545;
font-size: 0.85em;
margin-top: 5px;
display: none; /* Hidden by default */
}
.error-message.visible {
display: block;
}
.button-group {
display: flex;
justify-content: space-between;
margin-top: 25px;
flex-wrap: wrap;
gap: 10px;
}
button {
padding: 12px 25px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
font-weight: bold;
transition: background-color 0.3s ease, transform 0.2s ease;
color: white;
}
button.primary {
background-color: var(–primary-color);
}
button.primary:hover {
background-color: #003366;
transform: translateY(-2px);
}
button.success {
background-color: var(–success-color);
}
button.success:hover {
background-color: #218838;
transform: translateY(-2px);
}
button.secondary {
background-color: #6c757d;
}
button.secondary:hover {
background-color: #5a6268;
transform: translateY(-2px);
}
#results {
background-color: #e9ecef;
padding: 25px;
border-radius: 8px;
margin-top: 30px;
border: 1px solid var(–border-color);
text-align: center;
}
#results h3 {
margin-top: 0;
color: var(–primary-color);
}
.result-item {
margin-bottom: 15px;
}
.result-item strong {
display: block;
font-size: 1.1em;
color: var(–primary-color);
}
.result-item span {
font-size: 1.8em;
font-weight: bold;
color: var(–primary-color);
display: block;
margin-top: 5px;
}
.formula-explanation {
font-size: 0.9em;
color: #555;
margin-top: 15px;
padding-top: 15px;
border-top: 1px dashed var(–border-color);
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 25px;
box-shadow: 0 2px 5px var(–shadow-color);
}
th, td {
padding: 12px 15px;
text-align: left;
border: 1px solid var(–border-color);
}
thead {
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;
}
canvas {
display: block;
margin: 25px auto;
max-width: 100%;
border: 1px solid var(–border-color);
border-radius: 4px;
}
.article-content {
width: 100%;
max-width: 960px;
background-color: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 4px 15px var(–shadow-color);
margin-top: 30px;
text-align: left;
}
.article-content p, .article-content ul, .article-content ol {
margin-bottom: 20px;
font-size: 1.05em;
}
.article-content ul, .article-content ol {
padding-left: 25px;
}
.article-content li {
margin-bottom: 10px;
}
.article-content a {
color: var(–primary-color);
text-decoration: none;
font-weight: bold;
}
.article-content a:hover {
text-decoration: underline;
}
.faq-item {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px dashed var(–border-color);
}
.faq-item:last-child {
border-bottom: none;
}
.faq-item strong {
display: block;
color: var(–primary-color);
margin-bottom: 5px;
font-size: 1.1em;
}
.related-links ul {
list-style: none;
padding: 0;
}
.related-links li {
margin-bottom: 15px;
}
.related-links li a {
font-weight: bold;
}
.related-links li p {
font-size: 0.95em;
color: #555;
margin-top: 3px;
}
.highlighted-result {
background-color: var(–success-color);
color: white;
padding: 15px;
border-radius: 5px;
margin-bottom: 20px;
font-size: 1.3em;
font-weight: bold;
text-align: center;
box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}
.chart-container {
text-align: center;
margin-top: 30px;
}
.chart-legend {
margin-top: 10px;
font-size: 0.9em;
color: #555;
}
.chart-legend span {
display: inline-block;
margin: 0 10px;
}
.chart-legend .color-box {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 5px;
vertical-align: middle;
border: 1px solid #ccc;
}
.chart-legend .series1 { background-color: #004a99; }
.chart-legend .series2 { background-color: #6c757d; }

@media (max-width: 768px) {
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
.container, .article-content { padding: 20px; }
.button-group { flex-direction: column; align-items: center; }
button { width: 100%; max-width: 300px; margin-bottom: 10px; }
button:last-child { margin-bottom: 0; }
}

FERS High-3 Calculator

Estimate your FERS High-3 average salary, a critical component for calculating your FERS retirement annuity.

Enter your salary for the first of your highest three consecutive years.

Enter your salary for the second of your highest three consecutive years.

Enter your salary for the third of your highest three consecutive years.



Your FERS High-3 Average

Total of High-3 Years:
Average Annual Salary (High-3):
Annuity Factor (Example):

The FERS High-3 average is calculated by summing the salaries of your three highest consecutive years of service and dividing by 36 months (3 years). This average is then used to determine your FERS annuity.

Salary Trend Over High-3 Years

Year 1 Salary
Year 2 Salary
Year 3 Salary

FERS High-3 Calculation Details
Metric Value
Year 1 Salary
Year 2 Salary
Year 3 Salary
Total of High-3 Years
FERS High-3 Average (Annual)

What is the FERS High-3 Average?

The FERS High-3 average is a fundamental calculation within the Federal Employees Retirement System (FERS). It represents the average of your highest three consecutive years of basic pay. This figure is not just a statistic; it’s the bedrock upon which your FERS retirement annuity is calculated. Understanding your FERS High-3 average is crucial for anyone planning their federal retirement, as it directly influences the amount of monthly income you can expect after leaving federal service.

Who should use it?
Any federal employee covered by the Federal Employees Retirement System (FERS) who is planning for retirement or wants to understand their potential retirement benefits should be familiar with the FERS High-3 average. This includes FERS employees who are nearing retirement age, those who are considering career changes within the federal government, or even those early in their careers who want to maximize their future retirement income.

Common misconceptions
One common misconception is that the “highest three years” are simply the last three years worked. This is incorrect. FERS specifically looks for the three *consecutive* years that yield the highest average. Another misconception is that overtime pay or bonuses are included in the basic pay calculation for the High-3. Generally, only basic pay is considered, though specific rules can apply to certain types of pay. It’s vital to consult official FERS guidelines or a retirement specialist to clarify what constitutes “basic pay” for your specific situation. This calculator focuses on basic pay for simplicity.

FERS High-3 Average Formula and Mathematical Explanation

The calculation for the FERS High-3 average is straightforward but requires careful attention to the definition of “highest three consecutive years.”

Step-by-step derivation:

  1. Identify all years of service where you earned basic pay.
  2. Determine the basic pay earned during each of those years.
  3. Find the period of three consecutive years that yields the highest total basic pay. This is your “High-3” period.
  4. Sum the basic pay from these three consecutive years.
  5. Divide the total sum by 36 (the number of months in three years) to get the average monthly basic pay.
  6. Multiply this monthly average by 12 to get the average annual basic pay, which is your FERS High-3 average.

Formula:

FERS High-3 Average = (Salary Year 1 + Salary Year 2 + Salary Year 3) / 3

Where Year 1, Year 2, and Year 3 are the three consecutive years with the highest combined basic pay.

Variable explanations:

  • Salary Year 1, Salary Year 2, Salary Year 3: The basic annual pay earned during each of the three consecutive years that result in the highest average.
  • FERS High-3 Average: The calculated average annual basic pay over the identified three-year period.
FERS High-3 Variables
Variable Meaning Unit Typical Range
Salary Year X Basic annual pay for a specific year. USD ($) $30,000 – $200,000+ (depending on grade, experience, and time)
FERS High-3 Average Average annual basic pay over the highest 3 consecutive years. USD ($) $30,000 – $200,000+

Practical Examples (Real-World Use Cases)

Let’s illustrate the FERS High-3 average calculation with practical examples.

Example 1: Steady Career Progression

Sarah has been a federal employee for many years. Her basic pay for the last few years has been:

  • Year 1 (e.g., 2021): $75,000
  • Year 2 (e.g., 2022): $78,000
  • Year 3 (e.g., 2023): $81,000
  • Year 4 (e.g., 2024): $84,000

Sarah is planning to retire at the end of 2024. Her highest three consecutive years are 2022, 2023, and 2024.

  • Year 2022 Salary: $78,000
  • Year 2023 Salary: $81,000
  • Year 2024 Salary: $84,000

Calculation:

Total = $78,000 + $81,000 + $84,000 = $243,000

FERS High-3 Average = $243,000 / 3 = $81,000

Sarah’s FERS High-3 average is $81,000. If she retires with 20 years of service, her annuity multiplier would be 1.0% (for less than 20 years) or 1.1% (for 20+ years). Assuming 1.1%, her annual annuity would be $81,000 * 1.1% = $891,000. (Note: This is a simplified example; actual annuity calculation involves specific multipliers based on years of service and retirement date).

Example 2: Salary Dip and Recovery

John experienced a temporary setback in his career. His basic pay was:

  • Year 1 (e.g., 2020): $70,000
  • Year 2 (e.g., 2021): $68,000 (Salary reduction)
  • Year 3 (e.g., 2022): $72,000
  • Year 4 (e.g., 2023): $76,000
  • Year 5 (e.g., 2024): $80,000

John plans to retire at the end of 2024. The system will look for the highest three *consecutive* years.

  • Option A (2022-2024): $72,000 + $76,000 + $80,000 = $228,000
  • Option B (2021-2023): $68,000 + $72,000 + $76,000 = $216,000
  • Option C (2020-2022): $70,000 + $68,000 + $72,000 = $210,000

The highest total comes from 2022-2024.
Calculation:

Total = $72,000 + $76,000 + $80,000 = $228,000

FERS High-3 Average = $228,000 / 3 = $76,000

John’s FERS High-3 average is $76,000. This highlights how the consecutive nature of the calculation is critical. Even though 2020 had a higher salary than 2021, the period including 2021 was not his highest average.

How to Use This FERS High-3 Calculator

Our FERS High-3 Calculator is designed for simplicity and accuracy. Follow these steps to get your estimated High-3 average:

  1. Enter Salaries: Input your basic annual salary for each of the three consecutive years that you believe will be your highest. If you are unsure which years are highest, it’s best to consult your pay stubs or personnel records. For the calculator, simply enter the salary for Year 1, Year 2, and Year 3 of that consecutive period.
  2. Calculate: Click the “Calculate High-3” button.
  3. Review Results: The calculator will instantly display:
    • The highlighted primary result: Your estimated FERS High-3 Average Annual Salary.
    • Intermediate values: The total salary of the three years and an example annuity factor.
    • A summary table detailing each input and the calculated metrics.
    • A dynamic chart visualizing the salary trend across the three years.
  4. Understand the Formula: Read the brief explanation below the results to reinforce how the High-3 average is derived.
  5. Copy Results: Use the “Copy Results” button to easily transfer the key figures for your records or for use in other retirement planning tools.
  6. Reset: If you need to start over or input different figures, click the “Reset” button to clear the fields and results.

Decision-making guidance:
Your FERS High-3 average is a critical input for estimating your FERS annuity. A higher High-3 average directly translates to a higher potential annuity. While this calculator provides the High-3 average, remember that your total annuity also depends on your years of creditable service and the applicable FERS annuity multiplier (e.g., 1.0% or 1.1%). Use this figure as a cornerstone for your retirement planning, comparing it against your expected expenses and other potential income sources like Social Security or a Thrift Savings Plan (TSP) withdrawal. For precise annuity calculations, always refer to official OPM resources or consult a retirement planning expert.

Key Factors That Affect FERS High-3 Results

Several factors influence your FERS High-3 average and, consequently, your retirement annuity. Understanding these can help you strategize for maximizing your retirement benefits.

  • Basic Pay Increases: Annual pay raises, cost-of-living adjustments (COLAs), and promotions directly increase your basic pay. Consistently receiving raises in your highest-earning years will boost your High-3 average. This is why focusing on career advancement and seeking roles with higher pay potential is important.
  • Consecutive Years: The “consecutive” aspect is paramount. A single year with exceptionally high pay (e.g., due to a temporary assignment or bonus) might not significantly impact your High-3 average if it falls outside the highest three consecutive years. Planning your retirement timing around these peaks can be beneficial.
  • Type of Pay Included: FERS typically uses “basic pay.” This generally excludes overtime, bonuses, shift differentials, and other premium pays. Understanding what qualifies as basic pay is crucial. If your agency has specific pay structures, consult OPM guidelines.
  • Career Progression and Promotions: Moving into higher-graded positions naturally increases your basic pay. Strategic career planning, seeking promotions, and potentially changing agencies or roles to advance can significantly elevate your salary trajectory, thereby increasing your High-3 average.
  • Time in Service: While not directly part of the High-3 calculation itself, your total years of creditable service determine the annuity multiplier (1.0% or 1.1%). Maximizing both your High-3 average and your years of service is key to a substantial annuity.
  • Inflation and Cost of Living: While COLAs are factored into basic pay, understanding the impact of inflation on the *purchasing power* of your future annuity is important. A high High-3 average today might have less real value decades from now due to inflation. This underscores the importance of supplementing your FERS annuity with savings like the TSP.
  • Agency Pay Scales and Locality Adjustments: Different agencies and geographic locations have varying pay scales and locality pay adjustments. These directly impact your basic pay and thus your High-3 average. Working in high-cost-of-living areas or in agencies with more aggressive pay scales can lead to a higher High-3 average.

Frequently Asked Questions (FAQ)

Q1: What if my highest three years are not my last three years?

A: FERS specifically looks for the three *consecutive* years that yield the highest average basic pay, regardless of when they occurred in your career. Our calculator assumes you input the correct three consecutive years. If you’re unsure, review your pay history carefully.

Q2: Does overtime pay count towards my High-3 average?

A: Generally, no. FERS calculation is based on “basic pay.” Overtime, bonuses, shift differentials, and other forms of premium pay are typically excluded. Always verify with official FERS resources for your specific pay type.

Q3: How is the FERS High-3 average used in my annuity calculation?

A: Your High-3 average is multiplied by your years of creditable service and the appropriate FERS annuity multiplier (1.0% for less than 20 years of service, 1.1% for 20+ years of service, or 1.2% for CSRS component if applicable) to determine your gross annual annuity.

Q4: What if I had periods of unpaid leave or a salary reduction?

A: Periods of unpaid leave will result in zero pay for that period, potentially affecting which years are considered consecutive or lowering the average. Salary reductions will also lower the pay for that year. These factors can significantly impact your High-3 average.

Q5: Can my High-3 average change after I retire?

A: No, your FERS High-3 average is locked in at the time of your retirement. It is based on your earnings history up to your retirement date. However, your *annuity* may be subject to Cost-of-Living Adjustments (COLAs) after retirement.

Q6: What is the difference between FERS and CSRS High-3?

A: FERS uses the highest three consecutive years of basic pay. CSRS (Civil Service Retirement System) uses the highest three years of *average* basic pay, which might not necessarily be consecutive. The calculation methods and multipliers differ significantly.

Q7: How can I find my exact High-3 average?

A: The most accurate way is to consult the Office of Personnel Management (OPM) retirement estimates or your agency’s HR/retirement specialist. They have access to your complete earnings history and can perform the precise calculation based on official records. This calculator provides an estimate based on your inputs.

Q8: Does the Thrift Savings Plan (TSP) affect my High-3 average?

A: No, contributions to your Thrift Savings Plan (TSP) do not affect your FERS High-3 average calculation, as TSP contributions are separate from your basic pay calculation for annuity purposes. However, your TSP balance is a crucial component of your overall retirement income.

var chart = null; // Declare chart globally

function validateInput(inputId, errorId, minValue = 0) {
var input = document.getElementById(inputId);
var errorElement = document.getElementById(errorId);
var value = parseFloat(input.value);

errorElement.classList.remove(‘visible’);
input.style.borderColor = ‘#ddd’;

if (input.value === “”) {
errorElement.textContent = “This field cannot be empty.”;
errorElement.classList.add(‘visible’);
input.style.borderColor = ‘#dc3545’;
return false;
}
if (isNaN(value)) {
errorElement.textContent = “Please enter a valid number.”;
errorElement.classList.add(‘visible’);
input.style.borderColor = ‘#dc3545’;
return false;
}
if (value < minValue) {
errorElement.textContent = "Value cannot be negative.";
errorElement.classList.add('visible');
input.style.borderColor = '#dc3545';
return false;
}
return true;
}

function calculateFERSHigh3() {
var year1SalaryInput = document.getElementById('year1Salary');
var year2SalaryInput = document.getElementById('year2Salary');
var year3SalaryInput = document.getElementById('year3Salary');

var year1SalaryError = document.getElementById('year1SalaryError');
var year2SalaryError = document.getElementById('year2SalaryError');
var year3SalaryError = document.getElementById('year3SalaryError');

var isValid = true;
isValid = validateInput('year1Salary', 'year1SalaryError') && isValid;
isValid = validateInput('year2Salary', 'year2SalaryError') && isValid;
isValid = validateInput('year3Salary', 'year3SalaryError') && isValid;

if (!isValid) {
return;
}

var year1Salary = parseFloat(year1SalaryInput.value);
var year2Salary = parseFloat(year2SalaryInput.value);
var year3Salary = parseFloat(year3SalaryInput.value);

var totalHigh3 = year1Salary + year2Salary + year3Salary;
var averageHigh3 = totalHigh3 / 3;

// Simplified annuity factor example (actual FERS multipliers are 1.0% or 1.1%)
// We'll use 1.1% as a common example for 20+ years of service
var annuityFactorExample = averageHigh3 * 0.011;

document.getElementById('totalHigh3').textContent = '$' + averageHigh3.toFixed(2);
document.getElementById('averageHigh3').textContent = '$' + averageHigh3.toFixed(2);
document.getElementById('highlightedResult').textContent = '$' + averageHigh3.toFixed(2);
document.getElementById('annuityFactorExample').textContent = '$' + annuityFactorExample.toFixed(2) + ' (Example 1.1% multiplier)';

document.getElementById('tableYear1').textContent = '$' + year1Salary.toFixed(2);
document.getElementById('tableYear2').textContent = '$' + year2Salary.toFixed(2);
document.getElementById('tableYear3').textContent = '$' + year3Salary.toFixed(2);
document.getElementById('tableTotalHigh3').textContent = '$' + totalHigh3.toFixed(2);
document.getElementById('tableAverageHigh3').textContent = '$' + averageHigh3.toFixed(2);

updateChart([year1Salary, year2Salary, year3Salary]);
}

function resetCalculator() {
document.getElementById('year1Salary').value = '60000';
document.getElementById('year2Salary').value = '62000';
document.getElementById('year3Salary').value = '64000';

document.getElementById('year1SalaryError').textContent = '';
document.getElementById('year2SalaryError').textContent = '';
document.getElementById('year3SalaryError').textContent = '';

document.getElementById('year1Salary').style.borderColor = '#ddd';
document.getElementById('year2Salary').style.borderColor = '#ddd';
document.getElementById('year3Salary').style.borderColor = '#ddd';

document.getElementById('totalHigh3').textContent = '–';
document.getElementById('averageHigh3').textContent = '–';
document.getElementById('highlightedResult').textContent = '–';
document.getElementById('annuityFactorExample').textContent = '–';

document.getElementById('tableYear1').textContent = '–';
document.getElementById('tableYear2').textContent = '–';
document.getElementById('tableYear3').textContent = '–';
document.getElementById('tableTotalHigh3').textContent = '–';
document.getElementById('tableAverageHigh3').textContent = '–';

if (chart) {
chart.destroy(); // Destroy previous chart instance if it exists
chart = null;
}
// Re-initialize chart with default empty state or placeholder
var ctx = document.getElementById('salaryChart').getContext('2d');
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); // Clear canvas
// Optionally draw placeholder axes or text if needed
}

function copyResults() {
var highlightedResult = document.getElementById('highlightedResult').textContent;
var totalHigh3 = document.getElementById('totalHigh3').textContent;
var averageHigh3 = document.getElementById('averageHigh3').textContent;
var annuityFactorExample = document.getElementById('annuityFactorExample').textContent;

var year1Salary = document.getElementById('tableYear1').textContent;
var year2Salary = document.getElementById('tableYear2').textContent;
var year3Salary = document.getElementById('tableYear3').textContent;
var tableTotalHigh3 = document.getElementById('tableTotalHigh3').textContent;
var tableAverageHigh3 = document.getElementById('tableAverageHigh3').textContent;

var assumptions = "Key Assumptions:\n";
assumptions += "- Year 1 Salary: " + year1Salary + "\n";
assumptions += "- Year 2 Salary: " + year2Salary + "\n";
assumptions += "- Year 3 Salary: " + year3Salary + "\n";
assumptions += "- Annuity Multiplier Example: 1.1%";

var textToCopy = "FERS High-3 Calculation Results:\n\n";
textToCopy += "Primary Result (High-3 Average): " + highlightedResult + "\n";
textToCopy += "Total of High-3 Years: " + totalHigh3 + "\n";
textToCopy += "Average Annual Salary (High-3): " + averageHigh3 + "\n";
textToCopy += "Example Annuity Factor: " + annuityFactorExample + "\n\n";
textToCopy += "Calculation Details:\n";
textToCopy += "- Year 1 Salary: " + year1Salary + "\n";
textToCopy += "- Year 2 Salary: " + year2Salary + "\n";
textToCopy += "- Year 3 Salary: " + year3Salary + "\n";
textToCopy += "- Total of High-3 Years: " + tableTotalHigh3 + "\n";
textToCopy += "- FERS High-3 Average (Annual): " + tableAverageHigh3 + "\n\n";
textToCopy += assumptions;

navigator.clipboard.writeText(textToCopy).then(function() {
// Optional: Show a confirmation message
var originalText = event.target.textContent;
event.target.textContent = 'Copied!';
setTimeout(function() {
event.target.textContent = originalText;
}, 1500);
}).catch(function(err) {
console.error('Failed to copy text: ', err);
// Optional: Show an error message
});
}

function updateChart(data) {
var ctx = document.getElementById('salaryChart').getContext('2d');

// Destroy previous chart instance if it exists
if (chart) {
chart.destroy();
}

chart = new Chart(ctx, {
type: 'bar', // Use bar chart for salary comparison
data: {
labels: ['Year 1', 'Year 2', 'Year 3'],
datasets: [{
label: 'Salary',
data: data,
backgroundColor: [
'rgba(0, 74, 153, 0.6)', // Primary color for Year 1
'rgba(108, 117, 125, 0.6)', // Secondary color for Year 2
'rgba(240, 173, 78, 0.6)' // Warning color for Year 3
],
borderColor: [
'rgba(0, 74, 153, 1)',
'rgba(108, 117, 125, 1)',
'rgba(240, 173, 78, 1)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
ticks: {
callback: function(value) {
if (value % 10000 === 0) {
return '$' + value.toLocaleString();
}
return null;
}
}
}
},
plugins: {
legend: {
display: false // Legend is handled by the div below the chart
},
tooltip: {
callbacks: {
label: function(context) {
var label = context.dataset.label || '';
if (label) {
label += ': ';
}
if (context.parsed.y !== null) {
label += '$' + context.parsed.y.toLocaleString();
}
return label;
}
}
}
}
}
});
}

// Initial calculation on page load
document.addEventListener('DOMContentLoaded', function() {
calculateFERSHigh3();
});

Leave a Comment