Crate income_tax

Crate income_tax 

Source
Expand description

§Income Tax Calculation

This Rust crate provides functionality for income tax calculation in different years. It is currently aimed at German income tax but is welcome to additions for different countries and years.

§Example

Tax calculations are abstracted over the IncomeTax trait’s calculate function:

use income_tax::{IncomeTax, germany};

let tax = germany::IncomeTax2024;
let net_income = tax.calculate(70_000.0);
assert_eq!(net_income, Ok(18_797.0));

Convenience functions exist to directly calculate tax refunds:

use income_tax::{IncomeTax, germany};

let tax = germany::IncomeTax2024;
let refund = tax.tax_refund(100_000.0, 50_000.0);
assert_eq!(refund, Ok(20_491.0));

Modules§

germany
Provides income tax calculations for Germany.

Enums§

IncomeTaxError

Traits§

IncomeTax
Calculation of income taxes.