码迷,mamicode.com
首页 > 其他好文 > 详细

上海 三险一金 税后工资计算

时间:2016-05-30 19:43:17      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:

	public String wagesCalculate(double key) {
		// 小数保留两位
		DecimalFormat df = new DecimalFormat("######0.00");
		// 养老 22% 8%
		double endowment_company = key * 0.22;
		double endowment_personal = key * 0.08;
		// 医疗 6% 1%
		double medical_company = key * 0.06;
		double medical_personal = key * 0.01;
		// 工伤 0.5%
		double injury_company = key * 0.005;
		// 住房公积金 7% 7%
		double fund_company = key * 0.07;
		double fund_personal = key * 0.07;

		String fundCompany = df.format(fund_company);
		String fundPersonal = df.format(fund_personal);

		// 社保后工资
		double wages = key - endowment_personal - medical_personal
				- fund_personal;

		// 纳税工资,3500起征点
		double taxes_wages = wages - 3500;

		double taxes = 0;
		// 超额累进税率计算个人所得税
		if (taxes_wages <= 1500) {
			taxes = taxes_wages * 0.03;
		} else if (taxes_wages > 1500 && 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_wages > 55000 && taxes_wages <= 80000) {
			taxes = taxes_wages * 0.35 - 5505;
		} else if (taxes_wages > 80000) {
			taxes = taxes_wages * 0.45 - 13505;
		}

		// 实际工资
		double actual_wages = wages - taxes;

		String returnStr = "                     公司                     个人"
				+ System.getProperty("line.separator") + "养老:    "
				+ endowment_company + "    " + endowment_personal
				+ System.getProperty("line.separator") + "医疗:    "
				+ medical_company + "    " + medical_personal
				+ System.getProperty("line.separator") + "工伤:    "
				+ injury_company + System.getProperty("line.separator")
				+ "公积金:" + fundCompany + "    " + fundPersonal
				+ System.getProperty("line.separator") + "个人所得税:" + taxes
				+ System.getProperty("line.separator")
				+ "----------------------------------------------"
				+ System.getProperty("line.separator") +"税前月薪:"+key+"  税后月薪:     "
				+ actual_wages;
		return returnStr;

	}

  

上海 三险一金 税后工资计算

标签:

原文地址:http://www.cnblogs.com/xiaoyuanwu/p/5543635.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!