Skip to main content

Crate us_paycheck_tax

Crate us_paycheck_tax 

Source
Expand description

§us-paycheck-tax

2025 US federal income tax (progressive brackets + standard deduction) and FICA (Social Security + Medicare), the core of a paycheck/take-home calculation. Same figures behind the StateWage paycheck calculator.

use us_paycheck_tax::{take_home, FilingStatus};
// $75,000 single: fed tax on (75000-15000) + FICA
let (net, fed, fica) = take_home(75_000.0, FilingStatus::Single);
assert!(net < 75_000.0 && fed > 0.0 && fica > 0.0);

Enums§

FilingStatus

Constants§

ADDL_MEDICARE_RATE
MEDICARE_RATE
SS_RATE
2025 FICA.
SS_WAGE_BASE
STD_DEDUCTION_MARRIED
STD_DEDUCTION_SINGLE
2025 federal standard deductions.

Functions§

brackets
2025 federal brackets as (ceiling, rate); ceiling = f64::INFINITY for the top bracket.
federal_income_tax
Progressive federal income tax on a taxable income (after deductions).
fica
FICA: Social Security (capped) + Medicare (+ additional Medicare above threshold).
standard_deduction
Standard deduction for the filing status.
take_home
Take-home = gross - federal income tax (on taxable) - FICA. Returns (net, federal, fica).