3500元起步个税反算税前工资
去年年底算个税时写的,以供大家分享、指正!#include "stdio.h"
double TAX3500tolincome(double personaTAX3500)/* 3500元起步个税反算税前工资*/
{
/*'税率分别为:3%,10%,20%,25% ,30% ,35% ,45%
'速算扣除数: 0,105,555,1005,2755,5505,13505
'级数工资区间 税区间 速算 税率%
'1 1500 45 0 0.03
'2 4500 345 105 0.10
'3 9000 1245 555 0.20
'4 35000 7745 1005 0.25
'5 55000 13745 2755 0.30
'6 80000 22495 5505 0.35
'7 >80000 >22495 13505 0.45
'5587*0.2-555= 562.4
'(562.4+555)/0.2= 5587 +3500 */
double quickdeduction,taxrate,a,b;
double aftertaxincome ;
aftertaxincome=personaTAX3500;//税后收入
{
if(aftertaxincome<=45)
{taxrate=0.03;quickdeduction=0;}
if(aftertaxincome>45 && aftertaxincome<=345)
{taxrate=0.1;quickdeduction=105;}
if(aftertaxincome>345 && aftertaxincome<=1245)
{taxrate=0.2;quickdeduction=555;}
if(aftertaxincome>1245 && aftertaxincome<=7745)
{taxrate=0.25;quickdeduction=1005;}
if(aftertaxincome>7745 && aftertaxincome<=13745)
{taxrate=0.3;quickdeduction=2755;}
if(aftertaxincome>13745 && aftertaxincome<=22495)
{taxrate=0.35;quickdeduction=5505;}
if(aftertaxincome>22495)
{taxrate=0.45;quickdeduction=13505;}
}
b= (aftertaxincome + quickdeduction) / taxrate; //税前收入 = (税后收入 + 速算扣除数) / 税率
b+=3500;
return (b);
}
void main()
{
double a;
double personaTAX;
while(1)
{
printf("请输入需要反算工资的个税(3500元起步税率 五险一金扣除后工资):\n");
scanf("%lf" ,&a) ;
personaTAX=TAX3500tolincome(a);
printf("\n%0.2f元个税(3500元起步税率元起步税率 五险一金扣除后工资)税前工资=%0.2f元",a,personaTAX);
printf("\n\n 一切有为法,如梦幻泡影,如露亦如电,应作如是观。\n\n");
//system("pause");
}
}