年终奖2次计算和一次计税问题

时间:2021-02-13 13:09:58 职场 我要投稿

年终奖2次计算和一次计税问题

奖金可一次领取或二次领取。 一次领取, 奖金按12等分计税。 二次领取,6月份奖金与工资合并计税,12月份奖金按12等分计税。

年终奖2次计算和一次计税问题

合并计算方法为:  全月应纳税所得额 = 奖金 + 月工资 - 保险;  税金 = 全月应纳税所得额 × 税率 - 速算扣除数;12等分计税方法为:  全月应纳税额 = (奖金/12);  税金 =  奖金*税率-速算扣除数 得到税金

计税税率有以下等级。

2011年9月1日起调整后的7级超额累进税率全月应纳税所得额税率速算扣除数(元)

全月应纳税额不超过1500元3%0

全月应纳税额超过1500元至4500元10%105

全月应纳税额超过4500元至9000元20%555

全月应纳税额超过9000元至35000元25%1005

全月应纳税额超过35000元至55000元30%2755

全月应纳税额超过55000元至80000元35%5505

全月应纳税额超过80000元45%13505

在已知月工资,6月份奖金和12月份奖金的情况下 。如何知道一次领取和两次领取之间的差额呢。由于两种方式扣除税金前的.金额都是 工资*2 + 6月份奖金+ 12 月份奖金。所以差异在于税金的计算方法上。我们希望输出的信息足够充分,让使用者知道差异详细,所以我们要分别计算如下信息:   6月份扣税   6月份实得金额   12月份扣税 12月份实得金额 总扣税 总实得金额 总扣税差异具体实现如下(粗糙版):

/* * AnnualBonusRate.c * * Created on: Jun 6, 2012 * Author: xiewenbin *//* * Level tax tax rate Quick calculation deducton * 1 x<=1500 3% * 2 150080000 45% 13505.00 */#include#include#define THRESHOLD 3500.00//base datadouble salary;double insure;double bonusJune;double bonusDec;//once count taxdouble bonusJuneOnce;double taxesJuneOnce;double takeHomeJuneOnce;double bonusDecOnce;double taxesDecOnce;double takeHomeDecOnce;double taxesOnce;double takeHomeOnce;//twice count taxdouble bonusJuneTwice;double taxesJuneTwice;double takeHomeJuneTwice;double bonusDecTwice;double taxesDecTwice;double takeHomeDecTwice;double taxesTwice;double takeHomeTwice;double diffTaxes;void initBonusTax(void){ salary = 0.00; insure = 0.00; bonusJune = 0.00; bonusDec = 0.00; //once count tax bonusJuneOnce = 0.00; taxesJuneOnce = 0.00; takeHomeJuneOnce = 0.00; bonusDecOnce = 0.00; taxesDecOnce = 0.00; takeHomeDecOnce = 0.00; taxesOnce = 0.00; takeHomeOnce = 0.00; //twice count tax bonusJuneTwice = 0.00; taxesJuneTwice = 0.00; takeHomeJuneTwice = 0.00; bonusDecTwice = 0.00; taxesDecTwice = 0.00; takeHomeDecTwice = 0.00; taxesTwice = 0.00; takeHomeTwice = 0.00; diffTaxes = 0.00;}struct bonusTax{ int level; double taxRangeLeft; double taxRangeRight; double rate; double qcd;};typedef struct bonusTax TaxLevel;TaxLevel levels[] = { {1, 0.00, 1500.00, 0.03, 0.00}, {2, 1500.00, 4500.00, 0.10, 105.00}, {3, 4500.00, 9000.00, 0.20, 555.00}, {4, 9000.00, 35000.00, 0.25, 1005.00}, {5, 35000.00, 55000.00, 0.30, 2755.00}, {6, 55000.00, 80000.00, 0.35, 5505.00}, {7, 80000.00, 100000000.00, 0.45, 13505.00}};int getLevelByTax(double bonus){ int index = 0; int lastIndex = sizeof(levels)/sizeof(levels[0])-1; int i; for(i = lastIndex; i >= 0; i--) { if(bonus > levels[i].taxRangeLeft){ index = i; break; } } return index;}double computeTax(double bonus){ int myLevelIndex; double taxes; if(bonus <= 0){ return 0; } myLevelIndex = getLevelByTax(bonus); taxes = bonus*levels[myLevelIndex].rate - levels[myLevelIndex].qcd; return taxes;}//once count taxvoid computeOnceTax(void){ bonusJuneOnce = salary - insure; taxesJuneOnce = computeTax(bonusJuneOnce); takeHomeJuneOnce = bonusJuneOnce - taxesJuneOnce; bonusDecOnce = bonusJune + bonusDec; taxesDecOnce = computeTax(bonusDecOnce/12); takeHomeDecOnce = bonusDecOnce + (salary-insure) - taxesDecOnce; taxesOnce = taxesJuneOnce + taxesDecOnce; takeHomeOnce = takeHomeJuneOnce + takeHomeDecOnce;}//twice count taxvoid computeTwiceTax(void){ bonusJuneTwice = (salary - insure) + bonusJune; taxesJuneTwice = computeTax(bonusJuneTwice); takeHomeJuneTwice = bonusJuneTwice - taxesJuneTwice; bonusDecTwice = bonusDec; taxesDecTwice = computeTax(bonusDecTwice/12); takeHomeDecTwice = bonusDecTwice + (salary-insure) - taxesDecTwice; taxesTwice = taxesJuneTwice + taxesDecTwice; takeHomeTwice = takeHomeJuneTwice + takeHomeDecTwice;}void computeDiff(void){ diffTaxes = taxesTwice - taxesOnce;}void printOnceTax(void){ printf("Using once count tax: "); printf(" Taxes in June is %.2lf ",taxesJuneOnce); printf(" Take-home in June is %.2lf ",takeHomeJuneOnce); printf(" Taxes in December is %.2lf ", taxesDecOnce); printf(" Take-home in December is %.2lf ",takeHomeDecOnce); printf(" Total taxes is %.2lf ",taxesOnce); printf(" Total take-home is %.2lf ",takeHomeOnce);}void printTwiceTax(void){ printf("Using twice count tax: "); printf(" Taxes in June is %.2lf ",taxesJuneTwice); printf(" Take-home in June is %.2lf ",takeHomeJuneTwice); printf(" Taxes in December is %.2lf ", taxesDecTwice); printf(" Take-home in December is %.2lf ",takeHomeDecTwice); printf(" Total taxes is %.2lf ",taxesTwice); printf(" Total take-home is %.2lf ",takeHomeTwice);}void printDiffTax(void){ printf("Difference between two method: %.2lf ",diffTaxes);}void getSalaryAndBonus(void){ printf("Please enter your salary: "); fflush(stdout); scanf("%lf",&salary); printf("Please enter your insure: "); fflush(stdout); scanf("%lf",&insure); printf("Please enter your bonus in June: "); fflush(stdout); scanf("%lf",&bonusJune); printf("Please enter your bonus in December: "); fflush(stdout); scanf("%lf",&bonusDec);}int main(void){ initBonusTax(); getSalaryAndBonus(); computeOnceTax(); computeTwiceTax(); computeDiff(); printOnceTax(); printTwiceTax(); printDiffTax(); get); get); return 0;}