Created
November 23, 2020 18:55
-
-
Save hansbogert/c18cb88e86de3ec91f5e5702a4078dae to your computer and use it in GitHub Desktop.
Dutch wealthtax 2020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Use as ./program <total-wealth-as-int> | |
import sys | |
SCALE_1_END=72797 | |
SCALE_2_END=1000000 | |
FREE=30846 | |
a=int(sys.argv[1]) | |
grounds=a-FREE | |
in_scale1 = min(grounds,SCALE_1_END) | |
in_scale2 = min( | |
max( | |
grounds-SCALE_1_END, | |
0 | |
), | |
SCALE_2_END-SCALE_1_END | |
) | |
print("in scale 1 " + str(in_scale1)) | |
print("in scale 2 " + str(in_scale2)) | |
end = 0.67 * in_scale1 * 0.0007 | |
end += 0.33 * in_scale1 * 0.0528 | |
end += 0.21 * in_scale2 * 0.0007 | |
end += 0.79 * in_scale2 * 0.0528 | |
end *= 0.3 | |
print("to pay: " + str(end)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment