年終獎2次計算和一次計稅問題

來源:果殼範文吧 7.68K

獎金可一次領取或二次領取。 一次領取, 獎金按12等分計稅。 二次領取,6月份獎金與工資合併計稅,12月份獎金按12等分計稅。

年終獎2次計算和一次計稅問題

合併HRef="https://gkfwb.com/tags-5x7-0.html" target="_blank" >計算方法為:  全月應納稅所得額 = 獎金 + 月工資 - 保險;  稅金 = 全月應納稅所得額 × 稅率 - 速算扣除數;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]angeLeft){ 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] - levels[myLevelIndex]; 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;}


熱門標籤