Small tool implemented by VC: http://goc.ac.cn/liuag/html/software_calculatorx.html
The formula is very simple, and the program will understand it at a glance. PS: At that time, the tax start point was 1600, and now it's 2000, ^-^
// Calculate the income tax based on the pre-tax wage and individual tax start points
Double calculatetax (double presalary, Double Base)
{
Double tax;
Double taxsalary = presalary-base;
If (taxsalary <0 ){
Tax = 0;
} Else if (taxsalary <= 500 ){
Tax = taxsalary * 0.05;
} Else if (taxsalary <= 2000 ){
Tax = taxsalary * 0.10-25;
} Else if (taxsalary <= 5000 ){
Tax = taxsalary * 0.15-125;
} Else if (taxsalary <= 20000 ){
Tax = taxsalary * 0.20-375;
} Else if (taxsalary <= 40000 ){
Tax = taxsalary * 0.25-1375;
} Else if (taxsalary <= 60000 ){
Tax = taxsalary * 0.30-3375;
} Else if (taxsalary <= 80000 ){
Tax = taxsalary * 0.35-6375;
} Else if (taxsalary <= 100000 ){
Tax = taxsalary * 0.40-10375;
} Else {
Tax = taxsalary * 0.45-15875;
}
Return tax;
}
// Calculate the pre-tax salary based on the post-tax salary and individual tax start points
Double calculatesalarypretax (double postsalary, Double Base)
{
Double presalary;
Double taxsalary = postsalary-base;
Double tax_rate, fast_number;
If (taxsalary <= 0 ){
Return postsalary;
}
If (taxsalesary <= 475 ){
Tax_rate = 0.05;
Fast_number = 0;
} Else if (taxsalary <= 1875 ){
Tax_rate = 0.10;
Fast_number = 25;
} Else if (taxsalary <= 4375 ){
Tax_rate = 0.15;
Fast_number = 125;
} Else if (taxsalary <= 16375 ){
Tax_rate = 0.20;
Fast_number = 375;
} Else if (taxsalary <= 31375 ){
Tax_rate = 0.25;
Fast_number = 1375;
} Else if (taxsalary <= 45375 ){
Tax_rate = 0.30;
Fast_number = 3375;
} Else if (taxsalary <= 58375 ){
Tax_rate = 0.35;
Fast_number = 6375;
} Else if (taxsalary <= 70375 ){
Tax_rate = 0.40;
Fast_number = 10375;
} Else {
Tax_rate = 0.45;
Fast_number = 15375;
}
presalary = (postsalary-(base * tax_rate) -fast_number) / (1 - tax_rate);
return presalary;
}
(Liu aigui/aiguille. Liu)