1 #应纳税的钱:税前收入-5000元(起征点)-专项扣除(五险一金等) 2 #工资个税的计算公式为: 3 #个人所得税=应纳税的钱×适用税率-速算扣除数 4 ''' 5 1、全月应纳税所得额不超过3000元: 6 税率:3%; 速算扣除数(元):0 7 2、全月应纳税所得额超过3000元至12000元: 8 税率:10%; 速算扣除数(元):210 9 3、全月应纳税所得额超过12000元至25000元:10 税率:20%; 速算扣除数(元):141011 4、全月应纳税所得额超过25000元至35000元:12 税率:25%; 速算扣除数(元):266013 5、全月应纳税所得额超过35000元至55000元:14 税率:30%; 速算扣除数(元):441015 6、全月应纳税所得额超过55000元至80000元:16 税率:35%; 速算扣除数(元):716017 7、全月应纳税所得额超过80000元:18 税率:45%; 速算扣除数(元):1516019 '''20 #定义税前工资21 Tax_salary = int(input("请输入你的工资:"))22 if Tax_salary > 5000:23 #应纳税的工资24 Taxable_salary = Tax_salary - 5000 - Tax_salary * 0.2225 26 if Taxable_salary <= 3000:27 # 个人所得税28 Personal_income_taxes = Taxable_salary * 0.03 - 029 30 elif Taxable_salary > 3000 and Taxable_salary <= 12000:31 Personal_income_taxes = Taxable_salary * 0.1 - 21032 33 elif Taxable_salary > 12000 and Taxable_salary <= 25000:34 Personal_income_taxes = Taxable_salary * 0.2 - 141035 36 elif Taxable_salary > 25000 and Taxable_salary <= 35000:37 Personal_income_taxes = Taxable_salary * 0.25 - 266038 39 elif Taxable_salary > 35000 and Taxable_salary <= 55000:40 Personal_income_taxes = Taxable_salary * 0.3 - 441041 42 elif Taxable_salary > 55000 and Taxable_salary <= 80000:43 Personal_income_taxes = Taxable_salary * 0.35 - 716044 45 elif Taxable_salary > 80000:46 Personal_income_taxes = Taxable_salary * 0.45 - 1516047 #五险一金48 Five_one_gold = Tax_salary * 0.2249 #实发工资50 Net_pay = Tax_salary - Personal_income_taxes - Five_one_gold51 52 print("本月实发工资(税后)为:{}".format(Net_pay))53 else:54 print("本月实发工资(税后)为:{}".format(Tax_salary))
执行结果演示: