This repository has been archived by the owner on Feb 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
371 lines (360 loc) · 16.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Tax Calculator</title>
<script src="bundle.js"></script>
<link rel="icon" href="data:,">
</head>
<body class="antialiased">
<div class="container max-w-4xl mx-auto px-2">
<h1 class="text-3xl font-semibold my-2">
IRS Publication 15-T: Federal Income Tax Withholding Methods
</h1>
<h2 class="text-lg mb-6">
Worksheet 4. Employer’s Withholding Worksheet for Percentage Method
Tables for Manual Payroll Systems With Forms W-4 From 2020 or Later
</h2>
<form x-data="data()">
<fieldset class="mb-4">
<legend class="text-lg font-semibold mb-2">Step 1. Adjust the employee’s wage amount</legend>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1a</span>
<span>Enter the employee’s total taxable wages this payroll period</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-model="box1a"
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1b</span>
<span>Enter the number of pay periods you have per year</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-model="box1b"
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1c</span>
<span>Enter the amount from Step 4(a) of the employee’s Form W-4</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-model="box1c"
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1d</span>
<span>Divide line 1c by the number on line 1b</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box1d()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1e</span>
<span>Add lines 1a and 1d</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box1e()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1f</span>
<span>Enter the amount from Step 4(b) of the employee’s Form W-4</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-model="box1f"
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1g</span>
<span>Divide line 1f by the number on line 1b</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box1g()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">1h</span>
<span>Subtract line 1g from line 1e. If zero or less, enter -0-. This is the <strong>Adjusted Wage Amount</strong>.</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box1h()"
disabled
>
</label>
</fieldset>
<fieldset class="mb-4">
<legend class="text-lg font-semibold mb-1">Step 2. Figure the Tentative Withholding Amount</legend>
<p class="italic text-gray-700 mb-2">
Currently assumes W-4 from 2020 or later, semimonthly payroll period, checkbox is checked, married filing jointly.
</p>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">2a</span>
<span>Column A from withholding rate schedule</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box2a()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">2b</span>
<span>Column C from withholding rate schedule</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box2b()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">2c</span>
<span>Column D from withholding rate schedule</span>
</div>
<input
type="text"
pattern="[\d\.%]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box2c()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">2d</span>
<span>Subtract line 2a from line 1h</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box2d()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">2e</span>
<span>Multiply the amount on line 2d by the percentage on line 2c</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box2e()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">2f</span>
<span>
Add lines 2b and 2e. This is the <strong>Tentative Withholding Amount</strong>
</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box2f()"
disabled
>
</label>
</fieldset>
<fieldset class="mb-4">
<legend class="text-lg font-semibold mb-2">Step 3. Account for tax credits</legend>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">3a</span>
<span>Enter the amount from Step 3 of the employee’s Form W-4</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-model="box3a"
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">3b</span>
<span>Divide the amount on line 3a by the number of pay periods on line 1b</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
size="10"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box3b()"
disabled
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">3c</span>
<span>Subtract line 3b from line 2f. If zero or less, enter -0-</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box3c()"
disabled
>
</label>
</fieldset>
<fieldset class="mb-4">
<legend class="text-lg font-semibold mb-2">Step 4. Figure the final amount to withhold</legend>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">4a</span>
<span>Enter the additional amount to withhold from Step 4(c) of the employee’s Form W-4</span>
</div>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-model="box4a"
>
</label>
<label class="flex flex-wrap justify-between sm:flex-no-wrap items-center mb-4 sm:mb-2">
<div class="flex w-full mb-1 sm:w-4/6 sm:mb-0">
<span class="mr-2">4b</span>
<span>
Add lines 3c and 4a.
<strong>
This is the amount to withhold from the employee’s wages this pay period
</strong>
</span>
</div>
</span>
<input
type="text"
pattern="[\d\.]*"
inputmode="decimal"
class="w-full sm:w-1/6 shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
x-bind:value="box4b()"
disabled
>
</label>
</fieldset>
</form>
</div>
<script>
function data() {
function withholdingRateScheduleForWage(wage) {
const withholdingRateSchedules = [
{ minimumWage: 0, tentativeWithholding: 0, marginalRate: 0 },
{ minimumWage: 517, tentativeWithholding: 0, marginalRate: 0.10 },
{ minimumWage: 928, tentativeWithholding: 41.10, marginalRate: 0.12 },
{ minimumWage: 2189, tentativeWithholding: 192.42, marginalRate: 0.22 },
{ minimumWage: 4080, tentativeWithholding: 608.44, marginalRate: 0.24 },
{ minimumWage: 7321, tentativeWithholding: 1386.28, marginalRate: 0.32 },
{ minimumWage: 9156, tentativeWithholding: 1973.48, marginalRate: 0.35 },
{ minimumWage: 13476, tentativeWithholding: 3485.48, marginalRate: 0.37 },
]
return withholdingRateSchedules.filter((schedule) => {
return wage >= schedule.minimumWage
}).slice(-1)[0]
}
function addIfPresent(a, b) {
return a && b ? (Number.parseFloat(a) + Number.parseFloat(b)).toFixed(2) : null
}
function subtractOrZeroIfPresent(a, b) {
return a && b ? Math.max(a - b, 0).toFixed(2) : null
}
function multiplyIfPresent(a, b) {
return a && b ? (a * b).toFixed(2) : null
}
function divideIfPresent(a, b) {
return a && b && b != 0 ? (a / b).toFixed(2) : null
}
return {
box1a: null,
box1b: null,
box1c: null,
box1d() { return divideIfPresent(this.box1c, this.box1b) },
box1e() { return addIfPresent(this.box1a, this.box1d()) },
box1f: null,
box1g() { return divideIfPresent(this.box1f, this.box1b) },
box1h() { return subtractOrZeroIfPresent(this.box1e(), this.box1g()) },
withholdingRateSchedule() { return this.box1h() ? withholdingRateScheduleForWage(this.box1h()) : null },
box2a() { return this.withholdingRateSchedule() ? this.withholdingRateSchedule().minimumWage : null },
box2b() { return this.withholdingRateSchedule() ? this.withholdingRateSchedule().tentativeWithholding : null },
box2c() { return this.withholdingRateSchedule() ? `${this.withholdingRateSchedule().marginalRate * 100}%` : null },
box2d() { return subtractOrZeroIfPresent(this.box1h(), this.box2a()) },
box2e() { return this.withholdingRateSchedule() ? multiplyIfPresent(this.box2d(), this.withholdingRateSchedule().marginalRate) : null },
box2f() { return addIfPresent(this.box2b(), this.box2e()) },
box3a: null,
box3b() { return divideIfPresent(this.box3a, this.box1b) },
box3c() { return subtractOrZeroIfPresent(this.box2f(), this.box3b()) },
box4a: null,
box4b() { return addIfPresent(this.box3c(), this.box4a) },
}
}
</script>
</body>
</html>