netto.taxes_income

Functions

get_marginal_tax_rate(→ float)

Calculate the marginal tax rate for a given taxable income.

__calc_gradient(→ float)

calc_taxable_income(→ float)

Calculate the taxable income for a given salary and deductibles.

calc_income_tax(→ float)

Calculate the income tax for a given taxable income.

calc_income_tax_by_integration(→ float)

Calculate income tax by numerical integration of marginal tax rates.

Module Contents

netto.taxes_income.get_marginal_tax_rate(taxable_income: float, config: netto.config.TaxConfig | None = None) float[source]

Calculate the marginal tax rate for a given taxable income.

Parameters:
  • taxable_income (float or int) – The taxable income for which the marginal tax rate should be calculated.

  • config (TaxConfig, optional) – Tax configuration (uses default if not provided)

Returns:

marginal_tax_rate – The marginal tax rate for the given taxable income.

Return type:

float

Examples

# Calculate marginal tax rate for a taxable income of 10000 get_marginal_tax_rate(10000)

netto.taxes_income.__calc_gradient(x_i: float, x_j: float, y_i: float, y_j: float, x: float) float[source]
netto.taxes_income.calc_taxable_income(salary: float, deductible_social_security: float, deductibles_other: float = 0) float[source]

Calculate the taxable income for a given salary and deductibles.

Parameters:
  • salary (float or int) – The yearly salary for which the taxable income should be calculated.

  • deductible_social_security (float or int) – The amount of deductible social security contributions.

  • deductibles_other (float or int, optional) – Other deductibles that reduce the taxable income (default is 0).

Returns:

taxable_income – The taxable income for the given salary and deductibles.

Return type:

float

Examples

# Calculate taxable income for a salary of 50000 with deductible social security contributions of 1000 and no other deductibles calc_taxable_income(50000, 1000)

# Calculate taxable income for a salary of 60000 with deductible social security contributions of 2000 and other deductibles of 500 calc_taxable_income(60000, 2000, 500)

netto.taxes_income.calc_income_tax(taxable_income: float, config: netto.config.TaxConfig | None = None) float[source]

Calculate the income tax for a given taxable income.

Parameters:
  • taxable_income (float or int) – The taxable income for which the income tax should be calculated.

  • config (TaxConfig, optional) – Tax configuration (uses default if not provided)

Returns:

income_tax – The income tax for the given taxable income.

Return type:

float

Examples

# Calculate income tax for a taxable income of 10000 calc_income_tax(10000)

netto.taxes_income.calc_income_tax_by_integration(taxable_income: float, config: netto.config.TaxConfig | None = None) float[source]

Calculate income tax by numerical integration of marginal tax rates.

Parameters:
  • taxable_income (float) – Taxable income

  • config (TaxConfig, optional) – Tax configuration (uses defaults if not provided)

Returns:

Income tax amount

Return type:

float

Examples

>>> calc_income_tax_by_integration(10000)