• 【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 = 2
        personal_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 = 3
        personal_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 = 4
        personal_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
  • 相关阅读:
    选择排序
    java面试题08
    java面试题07
    java面试题06
    java面试题05
    oop.1
    4
    3
    Struts1中actionform和action属于MVC哪一层
    mysql查询时间段的所有数据
  • 原文地址:https://www.cnblogs.com/caixu/p/3788716.html
Copyright © 2020-2023  润新知