Returns the tax amount for the requested tax, passing all parameter information in a single call.
value = compute($taxname, $earnings, $ytdarnings, $filingstatus, $exemptions, $stateexemptions, $payperiods, $paydate, $misc, $aux, $ytdtax)
|value||A numeric result|
|$taxname||A string naming the specific tax from the table to be computed. For a list of valid tax names, see the taxList function.|
|$earnings||Earnings for the current pay period.|
|$ytdarnings||Year-to-date earnings prior to the current period.|
|$filingstatus||Numeric value representing the employee's $filingstatus|
|$exemptions||Federal exemptions claimed on the employee's W-4.|
|$stateexemptions||State exemptions claimed by the employee.|
|$payperiods||Number representing the total number of pay periods in a year.|
|$paydate||A Date object representing the check date.|
|$misc||A numerica value required by some formulas. The application database should associate one $misc value for each withheld tax for each employee. When this field is required, the tax object will have specific instructions in the $miscellaneous_instructions field.|
|$aux||A numerica value required by some formulas. The application database should associate one $aux value for each withheld tax for each employee. When this field is required, the tax object will have specific instructions in the $auxiliary_instructions field.|
|$ytdtax||Year-to-date tax amount withheld for the tax prior to the current period.|
This function returns a numeric value representing the calculated tax to be withheld or paid by the employer.
See Also: Tax