Skip to content

Instantly share code, notes, and snippets.

@tsujigiri
Last active December 12, 2015 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsujigiri/4722156 to your computer and use it in GitHub Desktop.
Save tsujigiri/4722156 to your computer and use it in GitHub Desktop.
Calculates German income tax
# Calculates the German income tax from the taxable income ("zu versteuerndes
# Einkommen"). Valid for 2010-2012.
function est (zvE)
if (zvE < 8005)
0
elseif (zvE < 13470)
y = (zvE - 8004) / 10000;
(912.17 * y + 1400) * y
elseif (zvE < 52882)
y = (zvE - 13469) / 10000;
(228.74 * y + 2397) * y + 1038
elseif (zvE < 250731)
0.42 * zvE - 8172
else
0.45 * zvE - 15694
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment