【Python】个人所得税

编程入门 行业动态 更新时间:2024-10-23 11:26:43

【Python】<a href=https://www.elefans.com/category/jswz/34/1726460.html style=个人所得税"/>

【Python】个人所得税

以月收入1w,举例计算个税:

#!/usr/bin/python
#-*- encoding:UTF-8 -*- 
#==============================================================================
#=========================Part1 需要手动填写数字
#==============================================================================
#收入项
#@标准工资
basic_salary=10000
#@加班工资
overtime_pay=0
#@补贴
night_snack_allowance=0#扣款项,细则:养老保险、医疗保险、失业保险,由企业和个人共同缴纳;工伤保险、生育保险,由企业承担;
#@养老保险         8%
employee_retirement_insurance=800
#@医疗保险         2%
employee_medical_insurance=200
#@失业保险         1%
employee_unemployment_insurance=80
#@住房公积金    7%
employee_housing_fund=560#==============================================================================
#=========================Part2 无需修改,除非个税征收方案变动
#==============================================================================
#@个人所得税     起征点3500
personal_income_tax_level=3500#应纳税所得额=扣除“三险一金”后月收入 - 扣除标准3500
money_before_de_personal_income_tax = (basic_salary + overtime_pay + night_snack_allowance) - (employee_retirement_insurance + employee_medical_insurance + employee_unemployment_insurance + employee_housing_fund) - personal_income_tax_level#==个人所得税=应纳税所得额×适用税率 - 速算扣除数
#==全月应纳税所得额                        税率        速算扣除数(元) 
#1-全月应纳税所得额不超过1500元            3%          0 
#2-全月应纳税所得额超过1500元至4500元      10%         105 
#3-全月应纳税所得额超过4500元至9000元      20%         555 
#4-全月应纳税所得额超过9000元至35000元     25%         1005 
#5-全月应纳税所得额超过35000元至55000元    30%         2755 
#6-全月应纳税所得额超过55000元至80000元    35%         5505 
#7-全月应纳税所得额超过80000元             45%         13505 #个人所得税
personal_income_tax = 0
#个人所得税所在梯度
pIT_level=0
#计算个人所得税
if ((money_before_de_personal_income_tax > 1500) & (money_before_de_personal_income_tax < 4500)): pIT_level = 2personal_income_tax = money_before_de_personal_income_tax * 0.1 - 105
elif ((money_before_de_personal_income_tax > 4500) & (money_before_de_personal_income_tax < 9000)): pIT_level = 3personal_income_tax = money_before_de_personal_income_tax * 0.2 - 555
elif ((money_before_de_personal_income_tax > 9000) & (money_before_de_personal_income_tax < 35000)): pIT_level = 4personal_income_tax = money_before_de_personal_income_tax * 0.25 - 1005
else :personal_income_tax=0
print "个人所得税: %s" %(personal_income_tax)#税后工资
net_pay = money_before_de_personal_income_tax - personal_income_tax + personal_income_tax_level
print "税后工资: %s" %(net_pay)print "--"
print "@@@@@个人所得税所在梯度level: %s" %(pIT_level)
#print "@@@@@应纳税所得额: %s" %(money_before_de_personal_income_tax)

打印:

D:\python>python calc_PersonalIncomeTax.py
个人所得税: 417.0
税后工资: 7943.0
--
@@@@@个人所得税所在梯度level: 3

 

转载于:.html

更多推荐

【Python】个人所得税

本文发布于:2023-06-27 08:10:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/908589.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:个人所得税   Python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!