Personal income tax calculation

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.