blob: 9dc355ea1d7dd222d2c795312a8c384594af61d4 (
plain) (
blame)
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
|
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Calculate your projected 401k savings based on a few simple inputs.">
<!-- icons -->
<link rel="apple-touch-icon" sizes="180x180" href="./assets/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/favicon/favicon-16x16.png">
<link rel="manifest" href="./assets/favicon/manifest.json">
<meta name="theme-color" content="#4f6ef7">
<!-- styles -->
<link rel="stylesheet" href="./assets/css/app.css">
<title>401k Projections</title>
</head>
<body>
<div class="app-container">
<header class="app-header">
<h1>401k Projection App</h1>
<p>Calculate your future 401k balance based on a few simple inputs.</p>
</header>
<!-- inputs panel -->
<section class="panel" aria-label="Plan inputs">
<p class="section-label">Your plan</p>
<div class="form-grid">
<div class="field">
<label for="begBalance">Beginning Balance</label>
<input id="begBalance" type="number" min="0" step="0.01" placeholder="5600.00">
</div>
<div class="field">
<label for="monthlyContr">Monthly Contribution</label>
<input id="monthlyContr" type="number" min="0" step="0.01" placeholder="300.00">
</div>
<div class="field">
<label for="returnRate">Annual Rate of Return (%)</label>
<input id="returnRate" type="number" min="0" step="0.01" placeholder="9.0">
</div>
<div class="field">
<label for="inflationRate">Annual Rate of Inflation (%)</label>
<input id="inflationRate" type="number" min="0" step="0.01" placeholder="1.2">
</div>
</div>
<div class="divider">Calculate by</div>
<div class="submit-grid">
<div class="submit-group">
<label for="years">Years until retirement</label>
<input id="years" type="number" min="1" step="1" placeholder="10">
<button type="button" class="btn-primary" onclick="retirementYears()">Calculate</button>
</div>
<div class="submit-group">
<label for="money">Target retirement amount ($)</label>
<input id="money" type="number" min="1" step="1" placeholder="500000">
<button type="button" class="btn-primary" onclick="retirementMoney()">Calculate</button>
</div>
</div>
</section>
<!-- graph panel -->
<section id="graphCard" class="panel" aria-label="Projections graph">
<p class="section-label">Projections</p>
<div class="chart-grid">
<div class="chartContainer" id="balChartContainer"></div>
<div class="chartContainer" id="intChartContainer"></div>
</div>
</section>
<!-- summary table -->
<div id="infoTableSection" class="panel table-section">
<h2>Base Information</h2>
<div style="overflow-x:auto">
<table class="data-table" id="infoTable">
<thead>
<tr>
<th scope="col">Beginning Balance</th>
<th scope="col">Monthly Contribution</th>
<th scope="col">Annual Return</th>
<th scope="col">Annual Inflation</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<!-- results table -->
<div id="resultsTableSection" class="panel table-section">
<h2>Month-by-Month Breakdown</h2>
<div style="overflow-x:auto">
<table class="data-table resultsTable">
<thead>
<tr>
<th scope="col">Month</th>
<th scope="col">Interest Earned</th>
<th scope="col">Contribution</th>
<th scope="col">New Balance</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
<!-- Plotly basic dist (~390 KB gz) via jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/plotly-basic.min.js"
integrity="sha256-E4wugQFLl53ACGepPaVbdgWhdJXueN16+0M7fwId/Po="
crossorigin="anonymous"></script>
<script src="./assets/js/app.js"></script>
</body>
</html>
|