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