Skip to content
1 change: 1 addition & 0 deletions changelog.d/aca-2027-calculator.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Compare 2027 coverage under current law and under H.R. 1834 in the calculator, with 2026 current law alongside: what the household pays for the benchmark plan after the credit, the credit itself, and both at an income the user enters.
1 change: 1 addition & 0 deletions changelog.d/aca-2027-calculator.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop the year setting and the other scenarios (the 700% FPL bill and CRFB's two bracket options) from the calculator page; old links still load their household.
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ function App() {
{!embedded && (
<header className="header">
<div className="header-content">
<h1>ACA Premium Tax Credits: 2025 vs 2026</h1>
<h1>ACA Premium Tax Credits</h1>
<p className="subtitle">
Modeling how the scheduled expiration of IRA enhancements affects health insurance costs
How the expiration of the enhanced credits, and proposals to extend them, affect health insurance costs
</p>
<div className="page-tabs">
<button
Expand Down
142 changes: 41 additions & 101 deletions src/components/Calculator.css
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,11 @@
text-align: center;
}

.impact-card.prior {
background: var(--pe-gray-50);
border: 2px dashed var(--pe-gray-300);
}

.impact-card.baseline {
background: var(--pe-gray-100);
}
Expand All @@ -502,39 +507,13 @@
border: 2px solid rgba(2, 132, 199, 0.3);
}

.impact-card.fpl700 {
background: rgba(124, 58, 237, 0.1);
border: 2px solid rgba(124, 58, 237, 0.3);
}

.impact-card.additional-bracket {
background: rgba(5, 150, 105, 0.1);
border: 2px solid rgba(5, 150, 105, 0.3);
}

.impact-card.simplified-bracket {
background: rgba(217, 119, 6, 0.1);
border: 2px solid rgba(217, 119, 6, 0.3);
}

.impact-card h4 {
font-size: 0.875rem;
font-weight: 600;
margin: 0 0 var(--pe-space-md) 0;
color: var(--pe-gray-700);
}

.impact-card h4 .reform-link {
color: inherit;
text-decoration: underline;
text-decoration-style: dotted;
text-underline-offset: 2px;
}

.impact-card h4 .reform-link:hover {
color: var(--pe-accent);
}

.impact-value {
font-size: 1.75rem;
font-weight: 700;
Expand All @@ -554,13 +533,47 @@
margin: 0;
}

.impact-gain {
.results-notice {
margin: 0 0 var(--pe-space-md) 0;
padding: var(--pe-space-sm) var(--pe-space-md);
border-radius: 8px;
background: #fef3c7;
color: #92400e;
font-size: 0.875rem;
}

.impact-breakdown {
margin: var(--pe-space-md) 0 0 0;
font-size: 0.8125rem;
color: var(--pe-text-secondary);
}

.impact-breakdown div {
display: flex;
justify-content: space-between;
gap: var(--pe-space-sm);
padding: 2px 0;
}

.impact-breakdown dd {
margin: 0;
font-weight: 600;
color: var(--pe-gray-800);
}

.impact-change {
font-size: 0.875rem;
font-weight: 600;
color: #16a34a;
color: var(--pe-gray-700);
margin: var(--pe-space-sm) 0 0 0;
}

.results-caption {
margin: var(--pe-space-md) 0 0 0;
font-size: 0.8125rem;
color: var(--pe-text-muted);
}

.impact-explanation {
padding: var(--pe-space-md);
background: var(--pe-gray-50);
Expand Down Expand Up @@ -650,79 +663,6 @@
flex: 1;
}

/* Chart Line Toggles */
.chart-toggles {
display: flex;
flex-wrap: wrap;
gap: var(--pe-space-sm);
align-items: center;
padding: var(--pe-space-md);
background: var(--pe-gray-50);
border-radius: var(--pe-radius-md);
margin-bottom: var(--pe-space-md);
}

.toggle-label {
font-size: 0.875rem;
font-weight: 600;
color: var(--pe-text-secondary);
margin-right: var(--pe-space-sm);
}

.toggle-item {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
background: white;
border: 1px solid var(--pe-border);
border-radius: var(--pe-radius-full);
cursor: pointer;
font-size: 0.8125rem;
color: var(--pe-text-secondary);
transition: all var(--pe-transition-fast);
}

.toggle-item:hover {
border-color: var(--pe-gray-400);
}

.toggle-item.active {
border-color: var(--pe-primary);
background: rgba(49, 151, 149, 0.05);
color: var(--pe-gray-900);
}

.toggle-item input {
display: none;
}

.toggle-color {
width: 12px;
height: 12px;
border-radius: 3px;
}

.toggle-color.baseline {
background: #9CA3AF;
}

.toggle-color.ira {
background: #0284C7;
}

.toggle-color.fpl700 {
background: #7c3aed;
}

.toggle-color.additional {
background: #059669;
}

.toggle-color.simplified {
background: #d97706;
}

/* Responsive */
@media (max-width: 1024px) {
.calculator-layout {
Expand Down
44 changes: 25 additions & 19 deletions src/components/Calculator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,21 @@ const getChipThreshold = (state) => {
// Cache TTL: 24 hours in milliseconds
const CACHE_TTL = 24 * 60 * 60 * 1000;

// Part of every browser cache key: change it when the API's answers change for
// the same request (a new policyengine-us pin), so no one sees the old ones.
const CACHE_VERSION = "policyengine-us-2.115.0";

function getCacheKey(data) {
const keyData = {
version: CACHE_VERSION,
year: data.year,
show_prior_year: data.show_prior_year,
age_head: data.age_head,
age_spouse: data.age_spouse,
dependent_ages: data.dependent_ages || [],
state: data.state,
county: data.county,
zip_code: data.zip_code,
show_ira: data.show_ira,
show_700fpl: data.show_700fpl,
show_additional_bracket: data.show_additional_bracket,
show_simplified_bracket: data.show_simplified_bracket,
};
return `aca-calc-${JSON.stringify(keyData)}`;
}
Expand Down Expand Up @@ -245,8 +248,12 @@ function Calculator() {
const sampleIncome = results.fpl * 3;

const hasChildren = (formData.dependent_ages || []).length > 0;
const priorBenchmark = results.slcsp_by_income_prior_year?.length
? Math.max(...results.slcsp_by_income_prior_year)
: 0;

const explainRequest = {
year: formData.year,
age_head: formData.age_head,
age_spouse: formData.age_spouse,
dependent_ages: formData.dependent_ages || [],
Expand All @@ -260,18 +267,19 @@ function Calculator() {
medicaid_adult_threshold_pct: getMedicaidAdultThreshold(formData.state),
medicaid_child_threshold_pct: getMedicaidChildThreshold(formData.state),
chip_threshold_pct: hasChildren ? getChipThreshold(formData.state) : 0,
// Which reforms are selected
show_ira: formData.show_ira,
show_700fpl: formData.show_700fpl,
show_additional_bracket: formData.show_additional_bracket,
show_simplified_bracket: formData.show_simplified_bracket,
// PTC values at sample income for all reforms
// The one comparison the page makes: H.R. 1834 against current law,
// with current law a year earlier.
show_ira: true,
show_700fpl: false,
show_additional_bracket: false,
show_simplified_bracket: false,
show_prior_year: Boolean(results.ptc_prior_year),
slcsp_prior_year: priorBenchmark,
// PTC values at sample income
sample_income: sampleIncome,
ptc_baseline_at_sample: findValueAtIncome(sampleIncome, results.income, results.ptc_baseline),
ptc_ira_at_sample: formData.show_ira ? findValueAtIncome(sampleIncome, results.income, results.ptc_ira) : 0,
ptc_700fpl_at_sample: formData.show_700fpl ? findValueAtIncome(sampleIncome, results.income, results.ptc_700fpl) : 0,
ptc_additional_bracket_at_sample: formData.show_additional_bracket ? findValueAtIncome(sampleIncome, results.income, results.ptc_additional_bracket) : 0,
ptc_simplified_bracket_at_sample: formData.show_simplified_bracket ? findValueAtIncome(sampleIncome, results.income, results.ptc_simplified_bracket) : 0,
ptc_ira_at_sample: findValueAtIncome(sampleIncome, results.income, results.ptc_ira),
ptc_prior_year_at_sample: findValueAtIncome(sampleIncome, results.income, results.ptc_prior_year),
};

try {
Expand Down Expand Up @@ -319,7 +327,7 @@ function Calculator() {
<div className="calculator-form-container">
<h2 className="calculator-title">Calculate Your Premium Tax Credits</h2>
<p className="calculator-subtitle">
Enter your household information to see how ACA policy changes would affect your health insurance costs.
Enter your household to see what it would pay for the benchmark plan in 2026 and 2027 under current law, and in 2027 if H.R. 1834 revived the enhanced credits.
</p>
<CalculatorForm onCalculate={handleCalculate} loading={loading} />

Expand Down Expand Up @@ -388,7 +396,7 @@ function Calculator() {
</svg>
</div>
<h3>Enter Your Household Details</h3>
<p>Fill out the form and click "Calculate" to see your projected premium tax credits under different policy scenarios.</p>
<p>Fill out the form and click "Calculate" to see your benchmark premiums and premium tax credits for 2026 and 2027.</p>
</div>
)}
</div>
Expand All @@ -402,12 +410,10 @@ function Calculator() {
income: results.income,
ptc_baseline: results.ptc_baseline,
ptc_ira: results.ptc_ira,
ptc_700fpl: results.ptc_700fpl,
ptc_additional_bracket: results.ptc_additional_bracket,
ptc_simplified_bracket: results.ptc_simplified_bracket,
medicaid: results.medicaid,
chip: results.chip,
fpl: results.fpl,
year: results.year,
}}
householdDescription={aiExplanation.household_description}
onClose={() => setAiExplanation(null)}
Expand Down
Loading