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

	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;

	}

  

转载于:https://www.cnblogs.com/xiaoyuanwu/p/5543635.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值