income-tax

Crates.ioincome-tax
lib.rsincome-tax
version0.2.0
created_at2024-12-02 13:21:46.49352+00
updated_at2024-12-02 13:40:49.667615+00
descriptionIncome tax calculations
homepagehttps://github.com/sunsided/income-tax-rs
repositoryhttps://github.com/sunsided/income-tax-rs
max_upload_size
id1468634
size29,405
Markus Mayer (sunsided)

documentation

README

Income Tax Calculation

Crates.io Crates.io GitHub Workflow Status Safety Dance docs.rs codecov

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.

use income_tax::{IncomeTax, germany};

fn germany_2024() {
    let tax = germany::IncomeTax2024;

    let net_income = tax.calculate(70_000.0);
    assert_eq!(net_income, Ok(18_797.0));
    
    let refund = tax.tax_refund(100_000.0, 50_000.0);
    assert_eq!(refund, Ok(20_491.0));
}
Commit count: 14

cargo fmt