Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Social Security and Medicare HI revenue tracking variables that properly separate taxation of benefits (TOB) by trust fund allocation.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Share of tier 1 Social Security benefit taxation revenue credited to OASDI trust funds
metadata:
unit: /1
reference:
- title: 26 USC 86 - Social security and tier 1 railroad retirement benefits
href: https://www.law.cornell.edu/uscode/text/26/86
values:
1984-01-01: 1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Share of tier 2 Social Security benefit taxation revenue credited to Medicare HI trust fund
metadata:
unit: /1
reference:
- title: 26 USC 86 - Social security and tier 1 railroad retirement benefits
href: https://www.law.cornell.edu/uscode/text/26/86
values:
1993-01-01: 1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
- name: Total Medicare revenue - worker with no benefits
period: 2024
input:
people:
person1:
age: 30
employment_income: 50_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Only payroll tax, no TOB
# Payroll = 50_000 * 0.029 = 1_450
medicare_hi_revenue: 1_450

- name: Total Medicare revenue - high earner above additional threshold
period: 2024
input:
people:
person1:
age: 30
employment_income: 250_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Payroll = 7_700 (from payroll test)
medicare_hi_revenue: 7_700

- name: Total Medicare revenue - retiree with high SS and income
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 67
social_security: 30_000
employment_income: 60_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Payroll = 60_000 * 0.029 = 1_740
# TOB tier 2 revenue ≈ 3_113
# Total ≈ 4_853
medicare_hi_revenue: 4_853

- name: Total Medicare revenue - zero income
period: 2024
input:
people:
person1:
age: 67
social_security: 0
employment_income: 0
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
medicare_hi_revenue: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
- name: Medicare payroll tax revenue - zero earnings
period: 2024
input:
people:
person1:
age: 30
employment_income: 0
households:
household:
members: [person1]
output:
payroll_tax_revenue_medicare: 0

- name: Medicare payroll tax revenue - standard earnings
period: 2024
input:
people:
person1:
age: 30
employment_income: 50_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Employee + employer Medicare tax
# Rate = 1.45% + 1.45% = 2.9%
# Revenue = 50_000 * 0.029 = 1_450
payroll_tax_revenue_medicare: 1_450

- name: Medicare payroll tax revenue - above additional threshold
period: 2024
input:
people:
person1:
age: 30
employment_income: 250_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Regular Medicare: 250_000 * 0.029 = 7_250
# Additional Medicare (employee only): (250_000 - 200_000) * 0.009 = 450
# Total = 7_250 + 450 = 7_700
payroll_tax_revenue_medicare: 7_700
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- name: SS payroll tax revenue - zero earnings
period: 2024
input:
people:
person1:
age: 30
employment_income: 0
households:
household:
members: [person1]
output:
payroll_tax_revenue_social_security: 0

- name: SS payroll tax revenue - standard earnings
period: 2024
input:
people:
person1:
age: 30
employment_income: 50_000
households:
household:
members: [person1]
output:
# Employee + employer SS tax
# Rate = 6.2% + 6.2% = 12.4%
# Revenue = 50_000 * 0.124 = 6_200
payroll_tax_revenue_social_security: 6_200

- name: SS payroll tax revenue - above wage base
period: 2024
input:
people:
person1:
age: 30
employment_income: 200_000
households:
household:
members: [person1]
output:
# 2024 wage base = 168_600
# Revenue = 168_600 * 0.124 = 20_906.40
payroll_tax_revenue_social_security: 20_906.40
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
- name: Total SS revenue - worker with no benefits
period: 2024
input:
people:
person1:
age: 30
employment_income: 50_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Only payroll tax, no TOB
# Payroll = 50_000 * 0.124 = 6_200
social_security_revenue: 6_200

- name: Total SS revenue - retiree with benefits and income
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 67
social_security: 20_000
employment_income: 30_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Payroll = 30_000 * 0.124 = 3_720
# TOB ≈ 495 (from TOB test)
# Total ≈ 4_215
social_security_revenue: 4_215

- name: Total SS revenue - zero income
period: 2024
input:
people:
person1:
age: 67
social_security: 0
employment_income: 0
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
social_security_revenue: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
- name: Tier 1 - zero income
period: 2024
input:
people:
person1:
age: 67
social_security: 0
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
taxable_social_security_tier_1: 0

- name: Tier 1 - below base threshold
period: 2024
input:
people:
person1:
age: 67
social_security: 20_000
employment_income: 0
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Combined income = 0 + 0.5 * 20_000 = 10_000
# Base threshold for SINGLE = 25_000
# 10_000 < 25_000, so tier 1 = 0
taxable_social_security_tier_1: 0

- name: Tier 1 - between base and adjusted base
period: 2024
input:
people:
person1:
age: 67
social_security: 20_000
employment_income: 20_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Combined income = 20_000 + 0.5 * 20_000 = 30_000
# Base threshold = 25_000, adjusted base = 34_000
# Excess over base = 30_000 - 25_000 = 5_000
# Tier 1 = min(0.5 * 20_000, 0.5 * 5_000) = min(10_000, 2_500) = 2_500
taxable_social_security_tier_1: 2_500

- name: Tier 1 - above adjusted base
period: 2024
input:
people:
person1:
age: 67
social_security: 30_000
employment_income: 50_000
tax_units:
tax_unit:
members: [person1]
filing_status: SINGLE
households:
household:
members: [person1]
output:
# Combined income = 50_000 + 0.5 * 30_000 = 65_000
# Base = 25_000, adjusted base = 34_000
# Over adjusted base, so tier 1 = bracket amount
# Bracket amount = min(amount_under_paragraph_1, 0.5 * (34_000 - 25_000))
# amount_under_paragraph_1 = min(0.5 * 30_000, 0.5 * (65_000 - 25_000))
# = min(15_000, 20_000) = 15_000
# Bracket amount = min(15_000, 0.5 * 9_000) = min(15_000, 4_500) = 4_500
taxable_social_security_tier_1: 4_500

- name: Tier 1 - joint filing with high income
period: 2024
input:
people:
person1:
age: 67
social_security: 40_000
employment_income: 60_000
person2:
age: 65
social_security: 20_000
employment_income: 40_000
tax_units:
tax_unit:
members: [person1, person2]
filing_status: JOINT
marital_units:
marital_unit:
members: [person1, person2]
marital_unit_id: 0
households:
household:
members: [person1, person2]
output:
# Combined income = 100_000 + 0.5 * 60_000 = 130_000
# Base for JOINT = 32_000, adjusted base = 44_000
# Over adjusted base
# Excess over base = 130_000 - 32_000 = 98_000
# amount_under_paragraph_1 = min(0.5 * 60_000, 0.5 * 98_000)
# = min(30_000, 49_000) = 30_000
# Bracket amount = min(30_000, 0.5 * (44_000 - 32_000))
# = min(30_000, 6_000) = 6_000
taxable_social_security_tier_1: 6_000
Loading