netto.taxes_income ================== .. py:module:: netto.taxes_income Functions --------- .. autoapisummary:: netto.taxes_income.get_marginal_tax_rate netto.taxes_income.__calc_gradient netto.taxes_income.calc_taxable_income netto.taxes_income.calc_income_tax netto.taxes_income.calc_income_tax_by_integration Module Contents --------------- .. py:function:: get_marginal_tax_rate(taxable_income: float, config: netto.config.TaxConfig | None = None) -> float Calculate the marginal tax rate for a given taxable income. :param taxable_income: The taxable income for which the marginal tax rate should be calculated. :type taxable_income: float or int :param config: Tax configuration (uses default if not provided) :type config: TaxConfig, optional :returns: **marginal_tax_rate** -- The marginal tax rate for the given taxable income. :rtype: float .. rubric:: Examples # Calculate marginal tax rate for a taxable income of 10000 get_marginal_tax_rate(10000) .. py:function:: __calc_gradient(x_i: float, x_j: float, y_i: float, y_j: float, x: float) -> float .. py:function:: calc_taxable_income(salary: float, deductible_social_security: float, deductibles_other: float = 0) -> float Calculate the taxable income for a given salary and deductibles. :param salary: The yearly salary for which the taxable income should be calculated. :type salary: float or int :param deductible_social_security: The amount of deductible social security contributions. :type deductible_social_security: float or int :param deductibles_other: Other deductibles that reduce the taxable income (default is 0). :type deductibles_other: float or int, optional :returns: **taxable_income** -- The taxable income for the given salary and deductibles. :rtype: float .. rubric:: 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) .. py:function:: calc_income_tax(taxable_income: float, config: netto.config.TaxConfig | None = None) -> float Calculate the income tax for a given taxable income. :param taxable_income: The taxable income for which the income tax should be calculated. :type taxable_income: float or int :param config: Tax configuration (uses default if not provided) :type config: TaxConfig, optional :returns: **income_tax** -- The income tax for the given taxable income. :rtype: float .. rubric:: Examples # Calculate income tax for a taxable income of 10000 calc_income_tax(10000) .. py:function:: calc_income_tax_by_integration(taxable_income: float, config: netto.config.TaxConfig | None = None) -> float Calculate income tax by numerical integration of marginal tax rates. :param taxable_income: Taxable income :type taxable_income: float :param config: Tax configuration (uses defaults if not provided) :type config: TaxConfig, optional :returns: Income tax amount :rtype: float .. rubric:: Examples >>> calc_income_tax_by_integration(10000)