]>
Commit | Line | Data |
---|---|---|
0993d859 SW |
1 | <!DOCTYPE html> |
2 | <html> | |
3 | <head> | |
4 | <script src="tax.js"></script> | |
d0678fe5 | 5 | <script src="tax_ui.js"></script> |
52ca3d7f | 6 | <!-- Tests are in tax.test.js --> |
d0678fe5 SW |
7 | <style> |
8 | td { padding: .5em; vertical-align: top} | |
9 | textarea { height: 12em; } | |
59179b68 | 10 | textarea.small { height: 4em; } |
d0678fe5 | 11 | input { width: 7em } |
7a5e093a SW |
12 | .output { padding: 1em; background-color: #eee; border: thin solid #888; width: max-content; } |
13 | .privacy_policy { margin-top: 5em; } | |
d0678fe5 | 14 | </style> |
0993d859 | 15 | </head> |
d0678fe5 SW |
16 | <body onload="calculate()"> |
17 | <h1>Inverse income tax tool</h1> | |
151ede0f | 18 | <p>What before-tax salary is needed to provide a specified after-tax salary?</p> |
d0678fe5 SW |
19 | |
20 | <form> | |
21 | <table> | |
22 | <tr> | |
23 | <td> | |
f0d01493 | 24 | Federal deductible<br/><input id="deductible_1" value="27700" onchange="calculate()" oninput="calculate()"/> |
d0678fe5 SW |
25 | </td> |
26 | <td> | |
f0d01493 | 27 | State deductible<br/><input id="deductible_2" value="10404" onchange="calculate()" oninput="calculate()"/> |
d0678fe5 SW |
28 | </td> |
29 | </tr> | |
30 | <tr> | |
31 | <td> | |
32 | Federal tax table<br/> | |
86fe1a72 | 33 | <textarea id="tax_table_1" onchange="calculate()" oninput="calculate()"> 0 10 |
f0d01493 SW |
34 | 22000 12 |
35 | 89450 22 | |
36 | 190750 24 | |
37 | 364200 32 | |
38 | 462500 32 | |
39 | 683750 35</textarea> | |
d0678fe5 SW |
40 | </td> |
41 | <td> | |
42 | State tax table<br/> | |
86fe1a72 | 43 | <textarea id="tax_table_2" onchange="calculate()" oninput="calculate()"> 0 1 |
f0d01493 SW |
44 | 20198 2 |
45 | 47884 4 | |
46 | 76576 6 | |
47 | 104910 8 | |
48 | 132590 9.3 | |
49 | 677278 10.3 | |
50 | 812728 11.3 | |
51 | 1354550 12.3</textarea> | |
d0678fe5 SW |
52 | <br/>(Initial table is California's) |
53 | </td> | |
54 | </tr> | |
55 | <tr> | |
59179b68 SW |
56 | <td> |
57 | Social Security tax<br/> | |
58 | <textarea id="tax_table_3" class="small" onchange="calculate()" oninput="calculate()"> 0 6.2 | |
59 | 160200 0</textarea> | |
60 | </td> | |
61 | <td> | |
62 | Medicare tax<br/> | |
63 | <textarea id="tax_table_4" class="small" onchange="calculate()" oninput="calculate()"> 0 1.45 | |
64 | 250000 2.35</textarea> | |
65 | </td> | |
899824d5 SW |
66 | <td> |
67 | Business tax<br/> | |
68 | <textarea id="tax_table_5" class="small" onchange="calculate()" oninput="calculate()"> 0 0.427</textarea> | |
69 | </td> | |
59179b68 SW |
70 | </tr> |
71 | <tr> | |
899824d5 | 72 | <td colspan="3"> |
d0678fe5 SW |
73 | Desired after-tax salary</br> |
74 | <input id="after_tax" value="100000" onchange="calculate()" oninput="calculate()"> | |
75 | </td></tr> | |
76 | </table> | |
77 | </form> | |
78 | ||
7a5e093a SW |
79 | <p class="output"> |
80 | <strong><span id="before_tax"></span> before tax</strong> | |
81 | - <span id="tax_1"></span> federal tax | |
82 | - <span id="tax_2"></span> state tax | |
59179b68 SW |
83 | - <span id="tax_3"></span> social security tax |
84 | - <span id="tax_4"></span> medicare tax | |
899824d5 | 85 | - <span id="tax_5"></span> business tax |
7a5e093a SW |
86 | = <span id="after_tax_verification"></span> after tax. |
87 | </p> | |
d0678fe5 | 88 | |
7a5e093a | 89 | <p class="privacy_policy">Privacy policy: All calculations are client-side; no figures are sent to any server.</p> |
0993d859 SW |
90 | </body> |
91 | </html> |