From 8d9c91e010b833349cbafe1a75bd6956981fba60 Mon Sep 17 00:00:00 2001 From: Kalakoi Date: Thu, 28 May 2026 13:04:22 +0000 Subject: [PATCH] Initial Commit --- annual/calc.js | 34 +++++++++++ annual/index.html | 152 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 annual/calc.js create mode 100644 annual/index.html diff --git a/annual/calc.js b/annual/calc.js new file mode 100644 index 0000000..a4e487f --- /dev/null +++ b/annual/calc.js @@ -0,0 +1,34 @@ +function calculate() { + const gross = parseFloat(document.getElementById('grossPay').value) || 0; + const freq = parseInt(document.getElementById('payFreq').value); + const status = document.getElementById('filingStatus').value; + const stateCode = document.getElementById('state').value; + const retPct = parseFloat(document.getElementById('retPct').value) / 100; + const preTax = (parseFloat(document.getElementById('preTaxPay').value) || 0) * freq; + const postTax = (parseFloat(document.getElementById('postTaxPay').value) || 0) * freq; + const other = (parseFloat(document.getElementById('otherPay').value) || 0) * freq; + const cityPct = (parseFloat(document.getElementById('cityTax').value) / 100) || 0; + + const stdDed = STD_DEDUCTIONS[status]; + document.getElementById('stdDedLabel').textContent = '$' + stdDed.toLocaleString(); + + const retirement = gross * retPct; + const preTaxTotal = retirement + preTax; + const fedtaxable = Math.max(0, gross - stdDed - preTaxTotal); + const taxable = Math.max(0, gross - preTaxTotal); + + const fed = calcBracketTax(fedtaxable, FED_BRACKETS[status]); + const ss = Math.min(gross, SS_BASE) * SS_RATE; + const med = gross * MED_RATE; + const addMed = gross > ADD_MED_THRESH[status] ? (gross - ADD_MED_THRESH[status]) * 0.009 : 0; + const fica = ss + med + addMed; + const stTax = calcStateTax(taxable, stateCode); + const ctTax = Math.max(0,taxable * cityPct); + const totalTax = fed + fica + stTax + ctTax; + const totalDeductions = preTaxTotal + postTax + other + totalTax; + const net = gross - totalDeductions; + const netPer = net / freq; + + currentData = { gross, retPct, retirement, preTax, preTaxTotal, postTax, other, fed, ss, med, addMed, fica, stTax, ctTax, totalTax, net, netPer, taxable, stdDed, freq, status, stateCode }; + renderResults(currentData); +} \ No newline at end of file diff --git a/annual/index.html b/annual/index.html new file mode 100644 index 0000000..a23346c --- /dev/null +++ b/annual/index.html @@ -0,0 +1,152 @@ + + + + + +Take-Home Pay Calculator & Retirement Analyzer + + + +
+
+ +

💰 Take-Home Pay Calculator

+
+

2026 Federal & State Tax Calculator with Retirement Analysis

+
+ +
+
+
+

⚙️ Your Details

+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + + 0% +
+
+
+
+ + + 10% +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ +
+ 2026 Standard Deduction: $16,100 | + FICA Rate: 7.65% (SS 6.2% + Medicare 1.45%) +
+
+
+ +
+
+
📊
+

Enter your details and click Calculate to see your take-home pay breakdown.

+
+
+
+
+ + + + +