公司薪水算法
根据公司工资表算来的,仅供参考。
double getInHand(double salary) {
double funHouse = salary * 0.10; // 住房基金
double insAged = ((salary > 2734) ? 2734 : salary) * 0.08; // 养老保险
double insMedical = ((salary > 2734) ? 2734 : salary) * 0.02 + 3; // 医疗保险
double insUnEmploy = ((salary > 2734) ? 2734 : salary) * 0.005; // 失业保险double taxIncome = 0; // 个人所得税
double taxIncomeBase = salary - funHouse - insAged - insMedical - insUnEmploy; // 个税计算基数if(taxIncomeBase <= 1600) {
taxIncome = 0;
} else if(taxIncomeBase <= 2100) {
taxIncome = (taxIncomeBase - 1600) * 0.05;
} else if(taxIncomeBase <= 3600) {
taxIncome = (taxIncomeBase - 1600) * 0.1 - 25;
} else if(taxIncomeBase <= 6600) {
taxIncome = (taxIncomeBase - 1600) * 0.15 - 125;
} else if(taxIncomeBase <= 21600) {
taxIncome = (taxIncomeBase - 1600) * 0.2 - 375;
} else {
taxIncome = (taxIncomeBase - 1600) * 0.25 - 1375;
}
double intoHand = taxIncomeBase - taxIncome;return intoHand;
}