Salary calculation of Shanghai three risks and one gold after tax

Source: Internet
Author: User

Public String wagescalculate (double key) {///decimals reserved two-bit decimalformat df = new DecimalFormat ("##### #0.00");//Endowment 22% 8%double E  Ndowment_company = key * 0.22;double endowment_personal = key * 0.08;//Medical 6% 1%double medical_company = key * 0.06;double medical_personal = key * 0.01;//injury 0.5%double Injury_company = key * 0.005;//Housing Provident Fund 7% 7%double Fund_company = key * 0.0 7;double fund_personal = key * 0.07; String Fundcompany = Df.format (Fund_company); String fundpersonal = Df.format (fund_personal);//Social Security post wage double wages = Key-endowment_personal-medical_personal-fund_pe rsonal;//tax pay, 3500 levy point Double taxes_wages = wages-3500;double taxes = 0;//Excess progressive tax rate calculation of personal income tax if (Taxes_wages <=) {taxe s = taxes_wages * 0.03;} else if (taxes_wages > && taxes_wages <= 4500) {taxes = Taxes_wages * 0.1-105;} else if (taxes_wages > 4500 && taxes_wages <= 9000) {taxes = Taxes_wages * 0.2-555;} else if (Taxes_wages > 9000 && Taxes_wages <= 35000) {taxes = Taxes_Wages * 0.25-1005;} else if (taxes_wages > 35000 && taxes_wages <= 55000) {taxes = Taxes_wages * 0.3-2775;} else if (Taxes_wag Es > 55000 && taxes_wages <= 80000) {taxes = Taxes_wages * 0.35-5505;} else if (Taxes_wages > 80000) {t Axes = taxes_wages * 0.45-13505;} Real wages double actual_wages = wages-taxes; String returnstr = "Company Personal" + system.getproperty ("line.separator") + "retirement:" + END  Owment_company + "" + endowment_personal+ System.getproperty ("line.separator") + "medical:" + Medical_company + "" + medical_personal+ system.getproperty ("line.separator") + "injury:" + Injury_company + system.getproperty ("Line.separator") + "CPF:" + fundcompany + "+ fundpersonal+ System.getproperty (" line.separator ") +" personal income Tax: "+ taxes+ System.getproper Ty ("line.separator") + "----------------------------------------------" + system.getproperty ("line.separator") + " Salary before tax: "+key+" salary after Tax: "+ Actual_wages;return returnstr;} 

  

Salary calculation of Shanghai three risks and one gold after tax

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.