Write a Python program that computes the income tax for an individual. The program should ask the user to enter the total taxable income for the year. The program then uses the tax bracket (as shown below) to calculate the tax amount. This is based on a progressive income tax system which is how income tax is calculated in the U.S. As a result, this for example means that only income above $500,001 is taxed at 37%. Income of lower levels are taxed at their given marginal rate.
10% on taxable income from $0 to $9,525,
plus 12% on taxable income over $9,526 to $38,700,
plus 22% on taxable income over $38,701 to $82,500,
plus 24% on taxable income over $82,501 to $157,500,
plus 32% on taxable income over $157,501 to $200,000,
plus 35% on taxable income over $200,001 to $500,000,
plus 37% on taxable income over $500,001 or more
income = int(input("Enter the total taxable income: "))
tax = 0
if income > 500000:
tax = (income - 500000)*(0.37)
income -= 500000
if income > 200000:
tax += (income - 200000)*(0.35)
income -= 200000
if income > 157500:
tax += (income - 157500)*(0.32)
income -= 157500
if income > 87500:
tax += (income - 87500)*(0.24)
income -= 87500
if income > 38700:
tax += (income - 38700)*(0.22)
income -= 38700
if income > 9525:
tax += (income - 9525)*(0.12)
income -= 9525
tax += income*0.1
print("Tax =", tax)
Get Answers For Free
Most questions answered within 1 hours.