# FIT Calculations

This page describes the standard build-in methods of calculating the Federal Income Tax (FIT) deduction in the standard FIT calc code. The methods described below require use of the standard, current FIT calc code. Any custom modifications are unsupported and may cause unexpected results with the documented methods below.

Certain methods discussed below require use of PY Employee Definition (PYUPEM) page, Switches tab, Switch 01: Smooth Tax Calc. In most cases, PYUPEM should be considered a read-only screen, since the data is populated from HREMEN. However, in this case, this switch does not exist in HR, and thus must be edited directly on PYUPEM if you choose to use one of the special smoothing methods described in this document.

## Standard Calculation

The standard FIT calculation will annualize FIT-eligible wages to determine the per-period deduction. FIT wages are determined by Pay Base 03 Period-To-Date amount. Employee must have an active FIT assignment in HRPYPR and have FIT eligible wages.

### Example

FIT-eligible wages are: 4,111.24

Annualized (based on 12 periods in this case) is: 49,334.88

Exemption amount is: 7,300 (2 exemptions at 3,650 each)

49,334.88 - 7,300 (from 2 exceptions) = taxable wages of: 42,034.88

This gets us to the appropriate tax table common code of PYTX/FExxST04, where xx is the tax year, for example, PYTX/FE11ST04 for the 2011 tax year.

42,034.88 minus low value from tax table of 36,050: 5,984.88

5,984.88 * 25% (tax bracket from tax table): 1,496.22

1,496.22 + base tax table amount of 4,281.25 = annualized tax of: 5777.47

5777.47 / 12 periods = final FIT tax of: 481.46 (rounded)

## Flat Tax Calculation

One alternate to annualizing FIT eligible wages is the Flat Tax. Often, one-time payments or bonuses are subject to Flat Tax rather than the standard tax tables. FIT Flat Tax wages are stored in Pay Base 15 and are CDH-specific. In other words, a CDH is either Flat-Taxed, or it is NOT Flat-Taxed. It cannot be both. Regular FIT wages are reduced by FIT Taxable wages before the normal FIT calculation takes place. Flat Tax is then calculated and added to FIT total. CDH must be set up to add to Pay Base 15 (Flat Tax Wages) and Pay Base 03 (Regular FIT Wages). The percentage to be used for Flat Tax calculation must be stored on Associated Value 1 on the FIT deduction in PYUPDD.

### Example

Using the same example above, we took 898.17 of wages, and made them eligible for a Flat Tax of 28%. Using the same calculation above, we reach a final per-period tax of 296.86. Add in the Flat Tax of 251.49 (898.17 * .28), to get to the final FIT tax of 548.34.

## Regular Tax Smoothing

Regular Tax Smoothing applies the average tax rate YTD to the current taxable wages. Set PYUPEM Switch 01 (Smooth Tax Calc) to Y.

### Example

Taxable wages is 4,111.24 as in previous examples.

YTD taxes paid = 563.90.

YTD FIT wages = 10,338.58.

The ratio of the YTD taxes paid to YTD FIT wages is .05454.

Current period wages of 4,111.24 * .05454 = final FIT deduction of 224.22.

## KAM Smoothing Method

The KAM smoothing method uses Pay Base 17 to subtract out wages before the FIT wages are annualized. These wages are then added back in before applying the normal wage bracket logic. Set PYUPEM Switch 01 (Smooth Tax Calc) to K. Set any KAM eligible wages to + into Pay Base 17 and Pay Base 03 (PYUPHH).

### Example

Total FIT wages = 4,111.24 as in previous examples.

KAM eligible wages (from CDH above) = 898.17.

After subtracting the KAM wages (898.17) from the regular FIT wages (4,111.24) and multiplying by 12 periods, we get an initial annualized number of 38,556.84. KAM wages are then added back in to get final FIT wages of 39,455.01.

This number (39,455.01) is then processed through the normal wage bracket tables to arrive at a period FIT deduction of 308.08.

## Cumulative Wage Method

Cumulative Wage logic looks back to the beginning of the tax year and calculates an average period taxable wages. This number (rather than the current period taxable wages) is then annualized and processed through the tax tables to reach the period FIT deduction amount. Set PYUPEM Switch 01 (Smooth Tax Calc) to C.

### Example

Rather than using the Period wages of 4111.24 to calculate annual FIT wages, this option takes the total FIT wages YTD (including the current period) of 10,338.58 and divides it by the number of periods paid thus far (3 in this case) to get an average period FIT wage of 3,446.19. 3,446.19 is then annualized and processed through the tax table to get an annual withholding of 3,981.89. 3,981.89 / 12 periods results in an average per-period withholding of 331.82, which is the final FIT amount.

## Supplemental Wage Method

This method can ONLY be used for Monthly pay cycles and is used when monthly supplemental payrolls cover the same month as the regular payroll. Set PYUPEM Switch 01 (Smooth Tax Calc) to S.

### Example

Regular FIT calculation arrives at a period deduction of 800.89.

Final FIT deduction is calculated as the difference between 800.89, and the Month-To-Date FIT taxes already paid of 481.46.

The final FIT deduction is 319.43.

## Standard FIT Calc Code

Below is the standard FIT calc code. The comments section at the beginning of the calc code may differ per client version.

<<************* FEDERAL INCOME TAX ***********

*------------------------------------------------------->>

<<------------------------------------------------------>>

<< CALC CODE LOGIC >>

<< * Check for DEBUG. >>

<< * Check filing status (Special Codes 1 and 2). >>

<< * Load Pay Base 15 for Flat Tax calculation. >>

<< * Check for Tax Smoothing. (Y,K,C,S types) >>

<< * Apply REG Tax Smoothing (type Y), calc it and exit.>>

<< * Load Pay Base 17 for KAM Smoothing. >>

<< * Load Pay Base 3 (regular FIT wages). >>

<< * Apply Cumulative Wage logic (type C). >>

<< * Apply Supplemental Wage logic (type S). >>

<< * Adjust PBS 15 and 17 if they exceed Taxable Wages. >>

<< * Subtract PBS 15 and 17 from Taxable Wages. >>

<< * Annualize Taxable Wages. >>

<< * Add back KAM Wages (Pay Base 17). >>

<< * Add NRAL Wages to annualized (Non Resident Aliens).>>

<< * Find standard deduction and tax bracket in tables. >>

<< * Compute annual FIT Tax and divide into PTD FIT Tax.>>

<< * Compute Flat Tax (pbs15 * 28%). >>

<< * Add Flat Tax amount to FIT Tax. >>

<< * Finish Supplemental Wage logic (Tax = difference). >>

<< * Add in any additional percentage amount. >>

<< * Done. >>

<<------------------------------------------------------>>

<< Basic logic for Cumulative Wage Method: *

FIT Taxable Wages YTD, including current period, *

is divided by number of periods so far, including *

the current period. This 'Avg Wages per Period' *

is then run through the normal w/holding calc. *

After determining the ‘W/Holding’ based on these *

wages, subtract the actual w/holding YTD. The *

difference is the current PTD w/holding. >>

<<------------------------------------------------------>>

<< Variables: >>

<< CVAR0-1 general use. >>

<< CVAR2 set to Tax Smoothing code. >>

<< CVAR3 set to Period Count in the Tax Year. >>

<< CVAR4-7 not used. >>

<< CVAR8-9 set to DEBUG. >>

<< NVAR0 set to Taxable Wages, PTD and Annualized. >>

<< NVAR1-3 general use. >>

<< NVAR4 set to MTD FIT wages for Supplemental Method. >>

<< NVAR5-7 not used. >>

<< NVAR8 set to KAM Smooth wages. >>

<< NVAR9 set to Flat Tax wages. >>

<<------------------------------------------------------>>

<< Initialize Variables. >>

<< Put 'DEBUG' in DEDD.VALDS(10) to activate debug. >>

<<------------------------------------------------------>>

NVAR0 := 0

NVAR1 := 0

NVAR2 := 0

NVAR4 := 0

NVAR8 := 0

NVAR9 := 0

CVAR0 := " "

CVAR1 := " "

CVAR2 := " "

NVAR3 := PERM.TYPERS

CVAR3 := NVAR3

CVAR3 := CVAR3[13,2]

CVAR8 := "DEBUG"

CVAR9 := DEDD.VALDS{10}

<<------------------------------------------------------>>

<< "E" in 1st special cd means employee is exempt. >>

<<------------------------------------------------------>>

IF EDED.CD{1} = "E" OR EDED.CD {2} = "99"

IF CVAR9 = CVAR8

WARN("Employee is exempt.")

ENDIF

STOP

ENDIF

<<------------------------------------------------------>>

<< If first 2 spec-cds are blank and no assigned AMT, >>

<< set the filing status to Single and Zero. >>

<<------------------------------------------------------>>

<< If 1st spec-cd is "F" set FIT to assigned AMT; EXIT. >>

<<------------------------------------------------------>>

IF EDED.AMT = 0

IF (EDED.CD{1} = " " AND EDED.CD{2} = " ")

EDED.CD {1} := "S"

EDED.CD {2} := 0

ENDIF

ELSE

IF (EDED.CD{1} = "F")

DEDX.AMT := EDED.AMT

IF CVAR9 = CVAR8

WARN("Override FIT amt: ", DEDX.AMT)

ENDIF

STOP

ENDIF

ENDIF

IF CVAR9 = CVAR8

WARN("FIT Status: ",EDED.CD{1},EDED.CD{2},EDED.CD{3})

WARN(" EDED(4): ",EDED.CD{4},EDED.AMT)

ENDIF

<<------------------------------------------------------>>

<< FLAT TAX: Load Pay Base 15 into NVAR9 for later. >>

<< Flat rate (28%) is taken from DEDD.VAL{1} >>

<<------------------------------------------------------>>

LOAD(PBSX.CLS,15)

IF MSCX.STATUS = "FAILED"

IF CVAR9 = CVAR8

WARN("Loadfail PB15")

ENDIF

ELSE

NVAR9 := PBSX.PTD

ENDIF

IF NVAR9 < 0

NVAR9 := 0

ENDIF

<<------------------------------------------------------>>

<< Check TAX SMOOTHING; Emp-Master sw(1) --> CVAR2 >>

<< Y - Regular Tax Smoothing >>

<< K - KAM Smoothing references PBS 17. >>

<< C - Cumulative Wage Method (look back YTD) >>

<< S - Supplemental Wage Method (Monthly PY only) >>

<<------------------------------------------------------>>

CVAR2 := EMPM.VECT

CVAR2 := CVAR2[1,1]

IF CVAR2 > " "

IF NVAR9 > 0

CVAR2 := " "

WARN("Smooth Tax Invalid", " - Flat Tax in Use")

ELSE

IF CVAR2 = "S" AND PERM.FREQ <> "M"

CVAR2 := " "

WARN("SUPPLMT Opt Invalid", " - Monthly Only")

ENDIF

ENDIF

ENDIF

<<------------------------------------------------------>>

<< Regular TAX SMOOTHING Calculation: >>

<< Tax = PTD-Wages * (YTD-Tax / YTD-Wage); EXIT. >>

<<------------------------------------------------------>>

IF CVAR2 = "Y"

LOAD (PBSX.CLS,3)

IF MSCX.STATUS = "FAILED"

WARN("FIT LOAD FAIL")

STOP

ENDIF

NVAR1 := PBSX.PTD

NVAR2 := DEDX.TTD / PBSX.TTD

NVAR3 := NVAR1 * NVAR2

DEDX.AMT := NVAR3

IF CVAR9 = CVAR8

WARN("REG SMOOTHTX")

WARN("Current txbl: ",NVAR1)

WARN(" YTD tax: ",DEDX.TTD)

WARN(" YTD txbl: ",PBSX.TTD)

WARN(" Ratio: ",NVAR2)

WARN(" Smooth Tax: ",DEDX.AMT)

ENDIF

STOP

ENDIF

<<------------------------------------------------------>>

<< KAM SMOOTHING - (Based on PB17) This differs from >>

<< flat tax in that we subtract out PB17; annualize >>

<< taxable wages; then immediately add PB17 back into >>

<< taxable wages. PB17 gets taxed at the employee's >>

<< marginal tax rate (from common codes) during normal >>

<< tax calculation rather than being added at the end. >>

<<------------------------------------------------------>>

IF CVAR2 = "K"

LOAD(PBSX.CLS,17)

IF MSCX.STATUS = "FAILED"

IF CVAR9 = CVAR8

WARN("Loadfail PB17")

ENDIF

ELSE

NVAR8 := PBSX.PTD

ENDIF

IF NVAR8 < 0

NVAR8 := 0

ENDIF

IF CVAR9 = CVAR8

WARN("KAM Smoothing")

ENDIF

ENDIF

<<------------------------------------------------------>>

<< Reload original FIT taxable PB3. >>

<<------------------------------------------------------>>

LOAD (PBSX.CLS,3)

IF MSCX.STATUS = "FAILED"

WARN("PB3 RELOADFAIL")

STOP

ELSE

NVAR0:=PBSX.PTD

ENDIF

<<------------------------------------------------------>>

<< Apply Cumulative Wage logic. >>

<<------------------------------------------------------>>

IF CVAR2 = "C"

IF DEDX.PRDS < 1

DEDX.PRDS := 1

ENDIF

NVAR1 := PBSX.TTD

NVAR2 := DEDX.PRDS + 1

NVAR3 := NVAR1 / NVAR2

IF CVAR9 = CVAR8

WARN("Cumulative Wage Opt.")

WARN("Current txbl: ",PBSX.PTD)

WARN("TTD+PTD txbl: ",NVAR1)

WARN(" / Periods: ",NVAR2)

WARN("Avg Wage/Per: ",NVAR3)

ENDIF

NVAR0 := NVAR3

ENDIF

<<------------------------------------------------------>>

<< Apply Supplemental Wage Logic. >>

<<------------------------------------------------------>>

IF CVAR2 = "S"

CVAR0 := DEDD.VALDS{2}

IF CVAR0 = "PERIOD"

NVAR1 := PERM.CC

ELSE

NVAR1 := CVAR0

ENDIF

IF PERM.CC = NVAR1

NVAR0 := PBSX.MTD

ENDIF

ENDIF

<<------------------------------------------------------>>

<< Reduce Flat Tax and KAM amounts if > FIT wages. >>

<<------------------------------------------------------>>

IF NVAR9 > NVAR0

NVAR9 := NVAR0

ENDIF

NVAR3 := NVAR0 - NVAR9

IF NVAR8 > NVAR3

NVAR8 := NVAR3

ENDIF

<<------------------------------------------------------>>

<< ANNUALIZE TAXABLE WAGES (minus PB15 and PB17). >>

<<------------------------------------------------------>>

<< Subtract Flat Tax and KAM Smoothing wages (PB15 and >>

<< PB17) from FIT Wages prior to annualizing. Then add >>

<< back in the KAM Smoothing wages. This simply accom- >>

<< plishes NOT annualizind the PB17 wages. >>

<<------------------------------------------------------>>

IF CVAR9 = CVAR8

WARN(" FIT Wages: ",NVAR0)

WARN("- Flat Wages: ",NVAR9)

WARN(" - KAM Wages: ",NVAR8)

ENDIF

NVAR0 := NVAR0 - NVAR9 - NVAR8

NVAR0 := NVAR0 * PERM.TYPERS

NVAR0 := NVAR0 + NVAR8

IF CVAR9 = CVAR8

WARN(" * periods: ",CVAR3)

WARN(" + KAM Wages: ",NVAR8)

WARN(" Annualized: ",NVAR0)

ENDIF

<<------------------------------------------------------>>

<< Adjust Taxable Wages for Non-Resident Alients >>

<<------------------------------------------------------>>

IF EDED.CD{3} = "NRAL"

NVAR0 := NVAR0 + DEDD.VAL{3}

IF CVAR9 = CVAR8

WARN("+ NRAL Add'l: ",DEDD.VAL{3})

ENDIF

ENDIF

<<------------------------------------------------------>>

<< Load Standard Deduction Table >>

<<------------------------------------------------------>>

CVAR1 := PERM.CKDT

CVAR0 := "PYTXFE"

CVAR0[7,2] := CVAR1[3,2]

CVAR0[9,4] := "SD01"

LOAD(NUCD.CC,CVAR0)

IF MSCX.STATUS = "FAILED"

WARN("SD TBL LOADFAIL ",CVAR0)

STOP

ENDIF

<<------------------------------------------------------>>

<< Adjust Income for Standard Deduction allowance >>

<<------------------------------------------------------>>

NVAR1 := EDED.CD{2}

NVAR2 := NVAR1 * NUCD.ASVAL{1}

NVAR0 := NVAR0 - NVAR2

<<------------------------------------------------------>>

<< Find Income Bracket >>

<<------------------------------------------------------>>

CVAR0[9,1] := EDED.CD{1}

CVAR0[10,1] := "T"

NVAR1 := 0

DO

NVAR1 := NVAR1 + 1

CVAR1 := NVAR1

IF NVAR1 > 10

CVAR0[11,2] := CVAR1[13,2]

ELSE

CVAR0[11,1] := "0"

CVAR0[12,1] := CVAR1[14,1]

ENDIF

LOAD(NUCD.CC,CVAR0)

UNTIL MSCX.STATUS = "FAILED" OR NVAR0 < NUCD.ASVAL {2}

IF MSCX.STATUS = "FAILED"

WARN("TAX TBL LOADFAIL ",CVAR0)

STOP

ENDIF

IF CVAR9 = CVAR8

WARN(" - STD Ded: ",NVAR2)

WARN(" FIT Taxable: ",NVAR0)

WARN(" Tax Table --->",CVAR0)

WARN("Tax Bracket -->",NUCD.ASVAL{4})

ENDIF

<<------------------------------------------------------>>

<< Compute Tax: NVAR2 holds regular annualized tax. >>

<< NVAR1 holds Flat Tax. >>

<< PTD Tax --> NVAR4 = NVAR2/Periods + NVAR1 >>

<<------------------------------------------------------>>

NVAR2 := (NVAR0 - NUCD.ASVAL {1})NUCD.ASVAL {4} + NUCD.ASVAL {3}

NVAR4 := NVAR2 / PERM.TYPERS

NVAR1 := NVAR9 * DEDD.VAL{1}

IF CVAR9 = CVAR8

WARN(" Annual w/h: ",NVAR2)

WARN(" Period w/h: ",NVAR4)

WARN(" + Flat Tax: ",NVAR1)

ENDIF

NVAR4 := NVAR4 + NVAR1

<<------------------------------------------------------>>

<< Finish Supplemental Wage Option. >>

<<------------------------------------------------------>>

IF CVAR2 = "S"

NVAR2 := NVAR4 - DEDX.MTD

IF CVAR9 = "DEBUG"

WARN("Supplemental Wage Opt.")

WARN("MTD Wages: ",PBSX.MTD)

WARN(" FIT Calc: ",NVAR4)

WARN(" MTD W/H: ",DEDX.MTD)

WARN(" Delta: ",NVAR2)

ENDIF

NVAR4 := NVAR2

ENDIF

NVAR5 := NVAR4

NVAR3 := 0

<<------------------------------------------------------>>

<< PERCENTAGE Additive routine: >>

<< "P" or "%" in Spec Code(4) and the % in AMT field. >>

<< e.g. 20% additional w/holding -> .20 in AMT >>

<<------------------------------------------------------>>

IF EDED.CD {4} = "P" OR EDED.CD{4} = "%"

NVAR1 := EDED.AMT

NVAR3 := NVAR4 * NVAR1

IF NVAR3 < 0

NVAR3 := 0

ENDIF

NVAR5 := NVAR4 + NVAR3

ENDIF

ROUND2(NVAR5)

IF CVAR9 = CVAR8

IF NVAR3 > 0.00

WARN(" Pct Added: ",NVAR3)

ENDIF

WARN(" Final FIT: ",NVAR5)

ENDIF

DEDX.AMT := NVAR5