netto.main

Functions

calc_netto(→ float)

Calculate net income from gross salary.

calc_inverse_netto(→ float)

Calculate required gross salary to reach desired net income.

Module Contents

netto.main.calc_netto(salary: float, deductibles: float = 0, verbose: bool = False, config: netto.config.TaxConfig | None = None) float[source]

Calculate net income from gross salary.

Parameters:
  • salary (float) – Yearly gross salary

  • deductibles (float, optional) – Additional deductibles that reduce taxable income

  • verbose (bool, optional) – Print detailed calculation breakdown

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

Returns:

Net income

Return type:

float

Examples

>>> calc_netto(50000)
>>> calc_netto(50000, deductibles=10000)
>>> calc_netto(50000, verbose=True)
>>> config = TaxConfig(year=2025, is_married=True)
>>> calc_netto(50000, config=config)
netto.main.calc_inverse_netto(desired_netto: float, deductibles: float = 0, config: netto.config.TaxConfig | None = None) float[source]

Calculate required gross salary to reach desired net income.

Parameters:
  • desired_netto (float) – Desired net income

  • deductibles (float, optional) – Additional deductibles that reduce taxable income

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

Returns:

Required gross salary

Return type:

float

Examples

>>> calc_inverse_netto(50000)
>>> calc_inverse_netto(50000, deductibles=5000)
>>> config = TaxConfig(year=2025, is_married=True)
>>> calc_inverse_netto(50000, config=config)