用python写一个北京市的个税计算器

python

#应纳税的钱:税前收入-5000元(起征点)-专项扣除(五险一金等)

#工资个税的计算公式为:

#个人所得税=应纳税的钱×适用税率-速算扣除数

\'\'\'

1、全月应纳税所得额不超过3000元:

税率:3%; 速算扣除数(元):0

2、全月应纳税所得额超过3000元至12000元:

税率:10%; 速算扣除数(元):210

3、全月应纳税所得额超过12000元至25000元:

税率:20%; 速算扣除数(元):1410

4、全月应纳税所得额超过25000元至35000元:

税率:25%; 速算扣除数(元):2660

5、全月应纳税所得额超过35000元至55000元:

税率:30%; 速算扣除数(元):4410

6、全月应纳税所得额超过55000元至80000元:

税率:35%; 速算扣除数(元):7160

7、全月应纳税所得额超过80000元:

税率:45%; 速算扣除数(元):15160

\'\'\'

#定义税前工资

Tax_salary = int(input("请输入你的工资:"))

if Tax_salary > 5000:

#应纳税的工资

Taxable_salary = Tax_salary - 5000 - Tax_salary * 0.22

if Taxable_salary <= 3000:

# 个人所得税

Personal_income_taxes = Taxable_salary * 0.03 - 0

elif Taxable_salary > 3000 and Taxable_salary <= 12000:

Personal_income_taxes = Taxable_salary * 0.1 - 210

elif Taxable_salary > 12000 and Taxable_salary <= 25000:

Personal_income_taxes = Taxable_salary * 0.2 - 1410

elif Taxable_salary > 25000 and Taxable_salary <= 35000:

Personal_income_taxes = Taxable_salary * 0.25 - 2660

elif Taxable_salary > 35000 and Taxable_salary <= 55000:

Personal_income_taxes = Taxable_salary * 0.3 - 4410

elif Taxable_salary > 55000 and Taxable_salary <= 80000:

Personal_income_taxes = Taxable_salary * 0.35 - 7160

elif Taxable_salary > 80000:

Personal_income_taxes = Taxable_salary * 0.45 - 15160

#五险一金

Five_one_gold = Tax_salary * 0.22

#实发工资

Net_pay = Tax_salary - Personal_income_taxes - Five_one_gold

print("本月实发工资(税后)为:{}".format(Net_pay))

else:

print("本月实发工资(税后)为:{}".format(Tax_salary))

执行结果演示:



以上是 用python写一个北京市的个税计算器 的全部内容, 来源链接: utcz.com/z/387508.html

回到顶部