Service tax calculator

Service tax calculator

    实习了,入职了,就会关注有多少钱能装自己兜里。
    实习走的是劳务报酬所得,规定如下:

1, each time remuneration income of less than 4,000 yuan, with fee income after subtracting $ 800 for the taxable income, that is, (the X--800) 20%, the X-represents the amount of income.
2 each remuneration income of more than 4,000 yuan, with 20% of income minus the amount of income taxable income.
3, income from remuneration made no more than 20,000 yuan, the tax rate of 20%, quick deduction is zero.
4, income from remuneration once income is extremely high (taxable income over 20,000 yuan), the formula for the X-
(1-20%) 30% -2000.
5, income from remuneration for more than 50,000 yuan, the formula for the X-
(1-20%) * 40% -7000.

x = 100000000
if not isinstance(x, int):
    raise TypeError
def  labor_service_tax(input_salary):
    if input_salary < 800:
        return input_salary
    if input_salary <= 4000:
        return input_salary - (input_salary - 800) * 0.2
    if input_salary <= 25000:
        return input_salary - input_salary * 0.8 * 0.2
    if input_salary <= 62500:
        return input_salary - (input_salary * 0.8 * 0.3 - 2000)
    return input_salary - (input_salary * 0.8 * 0.4 - 7000)
print(labor_service_tax(x))

Written list of maps, the way to sort out the formula:

salary = [0, 800, 4000, 25000, 62500, 80000]
# if not isinstance(x, int):
#     raise TypeError
def labor_service_tax(input_salary):
    if input_salary < 800:
        return input_salary
    if input_salary <= 4000:
        return input_salary * 0.8 + 160
    if input_salary <= 25000:
        return input_salary * 0.84
    if input_salary <= 62500:
        return input_salary * 0.76 + 2000
    return input_salary * 0.68 + 7000
real = [labor_service_tax(x) for x in salary]

plt.plot(salary, real)
plt.plot(salary, real, 'o')
plt.show()

Get a line chart:

[Abscissa remuneration (pay the price), the vertical axis is real income (can hold pocket money)]
    收入在62500以上时,税率就不再变化了。赚八万,到手61400。

    本来想再算算正式员工薪资税的,一查,太多了......靠,不算了,桑心。

    未来呀,何去何从呀~呀呀~呀呀呀~~~

Guess you like

Origin blog.csdn.net/qq_26271435/article/details/90697151