An example, simplistic, Javascript application to estimate city income tax for an unnamed locality, based on the number of days you worked inside city limits.
Formula used:
Tax = [ Wages * (Days Worked in City รท (Total Work Days - Holidays - PTO)) - Deduction ] * Tax Rate In this example, the tax is calculated based on the proportion of days worked within the city limits relative to the total work days available. This is based on an actual formula for a locality tax, where taking more sick or vacation days will increase your tax, which is illogical since most likely you are not present in the locality on those days.
Calendar year for which the tax is being calculated.
Total standard workdays in the year (typically 261 for a 5-day work week).
Enter a value from 0 to 344 days (365 minus holidays).
Employer-paid holidays when no work was performed.
Enter 0 or more days.
Vacation, sick leave, or other paid leave days.
Enter 0 or more days.
Number of days you were physically present and working inside taxation zone.
Enter a value from 0 to 240 days (total work days minus holidays).
Federal W-2 Box 1 wages for the year.
Enter 0 or more dollars.
You, your spouse (if filing jointly), dependents.
Enter a whole number from 1 to 20.
Enter as decimal (for example, 0.005 for 0.5%).
this year at non-resident tax rate 0.5%