1 、月启征税点5000元/月
2、如果你有租房专项附加扣除:1500元/月
3、假定每个月个人部分的三险一金(养老+医疗+失业+住房公积金)扣除:2000元/月
public static void main(String[] args) {
double input = 工资 - 征税点 - 租房补贴 - 五险一金总计;
lastCount(input);
}
public static double lastCount(double amount){
if (amount < 5000){
System.out.println(0);
}
double[] every = new double[12];
for (int i = 1; i <= 12; i++) {
double countTemplate = getCount((amount) * i);
double count = 0;
for (int j = 0; j < every.length; j++) {
count += every[j] ;
}
double thisCount = countTemplate - count;
every[i-1] = thisCount;
System.out.println("第"+i+"个月 : " + thisCount);
}
double count = 0;
for (double v : every) {
count += v;
}
System.out.println("总计: " + count);
}
public static double getCount(double thisAmount){
if ( 960000 < thisAmount){
return (thisAmount - 960000) * 0.45 + getCount(960000) ;
}
if (660000 < thisAmount){
return (thisAmount - 660000) * 0.35 + getCount(660000) ;
}
if (420000 < thisAmount){
return (thisAmount - 420000) * 0.30 + getCount(420000) ;
}
if (300000 < thisAmount){
return (thisAmount - 300000) * 0.25 + getCount(300000) ;
}
if (144000 < thisAmount){
return (thisAmount - 144000) * 0.20 + getCount(144000) ;
}
if (36000 < thisAmount){
return (thisAmount - 36000) * 0.1 + getCount(36000) ;
}
if (thisAmount <= 36000){
return thisAmount * 0.03;
}
return 0;
}
}