]> git.scottworley.com Git - inverse-tax/blobdiff - index.html
Add Social Security and Medicare taxes
[inverse-tax] / index.html
index 73aa260c38d10c4def3845cbe85c77b68c5f6e93..6702ed3918626c0565af80e42144c3ebfa5e8bf9 100644 (file)
@@ -3,9 +3,11 @@
 <head>
 <script src="tax.js"></script>
 <script src="tax_ui.js"></script>
+<!-- Tests are in tax.test.js -->
 <style>
   td { padding: .5em; vertical-align: top}
   textarea { height: 12em; }
+  textarea.small { height: 4em; }
   input { width: 7em }
   .output { padding: 1em; background-color: #eee; border: thin solid #888; width: max-content;  }
   .privacy_policy { margin-top: 5em; }
 </head>
 <body onload="calculate()">
 <h1>Inverse income tax tool</h1>
-<p>What gross salary is needed to provide a specified after-tax salary?</p>
+<p>What before-tax salary is needed to provide a specified after-tax salary?</p>
 
 <form>
 <table>
 <tr>
 <td>
-Federal deductible<br/><input id="deductible_1" value="24000" onchange="calculate()" oninput="calculate()"/>
+Federal deductible<br/><input id="deductible_1" value="27700" onchange="calculate()" oninput="calculate()"/>
 </td>
 <td>
-State deductible<br/><input id="deductible_2" value="8258" onchange="calculate()" oninput="calculate()"/>
+State deductible<br/><input id="deductible_2" value="10404" onchange="calculate()" oninput="calculate()"/>
 </td>
 </tr>
 <tr>
 <td>
 Federal tax table<br/>
 <textarea id="tax_table_1" onchange="calculate()" oninput="calculate()">     0 10
- 18651 15
- 75901 25
-153101 28
-233351 33
-416701 35
-470001 39.6</textarea>
+ 22000 12
+ 89450 22
+190750 24
+364200 32
+462500 32
+683750 35</textarea>
 </td>
 <td>
 State tax table<br/>
 <textarea id="tax_table_2" onchange="calculate()" oninput="calculate()">      0  1
-  16030  2
-  38002  4
-  59978  6
-  83258  8
- 105224  9.3
- 537500 10.3
- 644998 11.3
-1000000 12.3
-1074996 13.3</textarea>
+  20198  2
+  47884  4
+  76576  6
+ 104910  8
+ 132590  9.3
+ 677278 10.3
+ 812728 11.3
+1354550 12.3</textarea>
 <br/>(Initial table is California's)
 </td>
 </tr>
 <tr>
+<td>
+Social Security tax<br/>
+<textarea id="tax_table_3" class="small" onchange="calculate()" oninput="calculate()">      0  6.2
+ 160200  0</textarea>
+</td>
+<td>
+Medicare tax<br/>
+<textarea id="tax_table_4" class="small" onchange="calculate()" oninput="calculate()">      0  1.45
+ 250000  2.35</textarea>
+</td>
+</tr>
+<tr>
 <td colspan="2">
 Desired after-tax salary</br>
 <input id="after_tax" value="100000" onchange="calculate()" oninput="calculate()">
@@ -63,6 +76,8 @@ Desired after-tax salary</br>
   <strong><span id="before_tax"></span> before tax</strong>
   - <span id="tax_1"></span> federal tax
   - <span id="tax_2"></span> state tax
+  - <span id="tax_3"></span> social security tax
+  - <span id="tax_4"></span> medicare tax
   = <span id="after_tax_verification"></span> after tax.
 </p>