-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
389 lines (366 loc) · 17.2 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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Financial Calculator</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<meta name="description" content="You can use free financial calculators online to estimate your investments’ future value (FV), compounding periods (N), interest rate (I/Y), periodic payment (PMT), and present value (PV).">
<link rel="preload" href="./assets/fonts/inter-v12-latin-regular.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-500.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-600.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-800.woff2" as="font" crossorigin type="font/woff2">
<script type="text/javascript">
window._ = document.getElementById.bind(document);
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
window.defaultSystem = "imperial";
localStorage.setItem("theme", "light");
</script>
<link rel="stylesheet" href="./assets/css/main.min.css" />
<script src="./assets/js/all-calculators.js" defer></script>
</head>
<body style="background-color: transparent !important; min-height: 0 !important">
<div style="width: 100%;">
<div style="width:350px;float:left;padding: 15px;">
<div class="calculator-settings">
<div class="calculator-setting" id="calculator_form">
<div class="calculator-content col">
<div class="input-wrapper row">
<label class="input col">
<input type="hidden" value="fv" id="find"/>
<p class="input__title">Find</p>
<button class="button-switcher button-switcher--active" type="button" onclick="switcher(this, 'find', 'disabled')" value="fv" id="find-a">
<span class="button-switcher__text button-switcher__text--active">FV</span>
</button>
</label>
<label class="input col">
<p class="input__title"></p>
<button class="button-switcher" type="button" onclick="switcher(this, 'find', 'disabled')" value="pmt" id="find-b">
<span class="button-switcher__text">PMT</span>
</button>
</label>
<label class="input col">
<p class="input__title"></p>
<button class="button-switcher" type="button" onclick="switcher(this, 'find', 'disabled')" value="iy" id="find-c">
<span class="button-switcher__text">I/Y</span>
</button>
</label>
<label class="input col">
<p class="input__title"></p>
<button class="button-switcher" type="button" onclick="switcher(this, 'find', 'disabled')" value="n" id="find-d">
<span class="button-switcher__text">N</span>
</button>
</label>
<label class="input col">
<p class="input__title"></p>
<button class="button-switcher" type="button" onclick="switcher(this, 'find', 'disabled')" value="pv" id="find-e">
<span class="button-switcher__text">PV</span>
</button>
</label>
</div>
<div class="input-wrapper row find related-to-find-n">
<label class="input col ">
<p class="input__title">Number of Periods (N)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="number" value="15" />
</div>
</label> </div>
<div class="input-wrapper row find related-to-find-iy">
<label class="input col ">
<p class="input__title">Interest (I)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="interest" value="15" />
<span class="input-field__hint">% per year</span>
</div>
</label> </div>
<div class="input-wrapper row find related-to-find-pv">
<label class="input col ">
<p class="input__title">Present Value (PV)</p>
<div class="input-field row">
<span class="input-field__hint">$</span>
<input type="text" class="input-field__input" placeholder="" id="present" value="20000" />
</div>
</label> </div>
<div class="input-wrapper row find related-to-find-pmt">
<label class="input col ">
<p class="input__title">Periodic Payment (PMT)</p>
<div class="input-field row">
<span class="input-field__hint">$</span>
<input type="text" class="input-field__input" placeholder="" id="payment" value="-1500" />
</div>
</label> </div>
<div class="input-wrapper row find related-to-find-fv disabled">
<label class="input col ">
<p class="input__title">Future Value (FV)</p>
<div class="input-field row">
<span class="input-field__hint">$</span>
<input type="text" class="input-field__input" placeholder="" id="future" value="-60000" />
</div>
</label> </div>
</div>
<div class="calculator-content calculator-content--options calculator-content--gray col " >
<div class="calculator-content-head row">
<p class="calculator-content-head__title">Options</p>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.7071 7.29289L9.99999 10.5858L13.2929 7.29289C13.6834 6.90237 14.3166 6.90237 14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L10.7071 12.7071C10.3166 13.0976 9.68341 13.0976 9.29289 12.7071L5.29289 8.70711C4.90237 8.31658 4.90237 7.68342 5.29289 7.29289Z" fill="#9CA3AF"></path>
</svg>
</div>
<div class="calculator-content-body col">
<div class="input-wrapper row">
<label class="input col">
<input type="hidden" value="end" id="periodic_payment"/>
<p class="input__title">Periodic Payment at the</p>
<button class="button-switcher button-switcher--active" type="button" onclick="switcher(this, 'periodic_payment', '')" value="end" id="periodic_payment-a">
<span class="button-switcher__text button-switcher__text--active">End</span>
</button>
</label>
<label class="input col">
<p class="input__title"></p>
<button class="button-switcher" type="button" onclick="switcher(this, 'periodic_payment', '')" value="beginning" id="periodic_payment-b">
<span class="button-switcher__text">Beginning</span>
</button>
</label>
</div>
<div class="input-wrapper row">
<label class="input col ">
<p class="input__title">Number of Periods (P)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="periods" value="1" />
<span class="input-field__hint">per year</span>
</div>
</label> </div>
<div class="input-wrapper row">
<label class="input col ">
<p class="input__title">Number of Compounds (C)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="compounds" value="1" />
<span class="input-field__hint">per year</span>
</div>
</label> </div>
</div>
</div>
<div class="calculator-content calculator-content--gray calculator-content--footer calculator-content--small row " >
<button class="button button--primary ml-auto" onclick="calculate(this); animateElements();" data-action="calculate" id="action-button">Calculate</button>
</div>
<script type="text/javascript" src="./assets/js/lib/chartjs/chart.min.js" id="chartjs_lib" defer></script>
<script type="text/javascript" src="./assets/js/chart.js" id="chartjs_script" defer></script>
<script type="text/javascript" src="./assets/js/calculator.js" defer></script>
</div>
</div>
</div>
<div style="float:left;padding: 15px; overflow: scroll;">
<div class="calculator-result calculator-result--error col" id="error-box">
<div class="row">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM8.70711
7.29289C8.31658 6.90237 7.68342 6.90237 7.29289 7.29289C6.90237 7.68342 6.90237 8.31658 7.29289 8.70711L8.58579 10L7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289
12.7071C7.68342 13.0976 8.31658 13.0976 8.70711 12.7071L10 11.4142L11.2929 12.7071C11.6834 13.0976 12.3166 13.0976 12.7071 12.7071C13.0976 12.3166 13.0976 11.6834 12.7071
11.2929L11.4142 10L12.7071 8.70711C13.0976 8.31658 13.0976 7.68342 12.7071 7.29289C12.3166 6.90237 11.6834 6.90237 11.2929 7.29289L10 8.58579L8.70711 7.29289Z" fill="#F87171" class="dark:fill-red-200"></path>
</svg>
<p class="calculator-error__title">There was an error with your calculation.</p>
</div>
<div class="col" id="error-list"></div>
</div> <span id="calculator_result"><style>
.result-table-row.disabled {
display: none;
}
</style>
<div class="calculator-result col">
<div class="result-table__wrapper">
<table class="result-table">
<thead class="dark">
<tr>
<th class="dark indigo" colspan="2">Result</th>
</tr>
</thead>
<tbody class="result-table-row find related-to-find-pmt related-to-find-iy related-to-find-n related-to-find-pv">
<tr>
<th class="semibold">FV</th>
<td class="semibold animate" id="fv-result">$-91,370.62</td>
</tr>
</tbody>
<tbody class="result-table-row find related-to-find-fv related-to-find-iy related-to-find-n related-to-find-pv disabled">
<tr>
<th class="semibold">PMT</th>
<td class="semibold animate" id="pmt-result">$-2,159.32</td>
</tr>
</tbody>
<tbody class="result-table-row find related-to-find-fv related-to-find-pmt related-to-find-n related-to-find-pv disabled">
<tr>
<th class="semibold">I/Y</th>
<td class="semibold animate" id="iy-result">12.61%</td>
</tr>
</tbody>
<tbody class="result-table-row find related-to-find-fv related-to-find-pmt related-to-find-iy related-to-find-pv disabled">
<tr>
<th class="semibold">N</th>
<td class="semibold animate" id="n-result">11.5</td>
</tr>
</tbody>
<tbody class="result-table-row find related-to-find-fv related-to-find-pmt related-to-find-iy related-to-find-n disabled">
<tr>
<th class="semibold">PV</th>
<td class="semibold animate" id="pv-result">$16,144.72</td>
</tr>
</tbody>
<tbody class="result-table-sum animate">
<tr>
<th>Sum of all periodic payments</th>
<td id="result-total-payments">$-22,500.00</td>
</tr>
<tr>
<th>Total Interest</th>
<td id="result-total-interest">$93,870.62</td>
</tr>
</tbody>
</table>
</div>
<div class="table-cell table-cell--legend">
<div class="chart__donut-legend-item">
<div class="result-chart result-chart--yellow"></div>
<p class="result-text result-text--small">PV</p>
</div>
<div class="chart__donut-legend-item">
<div class="result-chart result-chart--purple"></div>
<p class="result-text result-text--small">PMT</p>
</div>
<div class="chart__donut-legend-item">
<div class="result-chart result-chart--sky"></div>
<p class="result-text result-text--small">Interest</p>
</div>
<div class="chart__donut-legend-item">
<div class="result-chart result-chart--teal"></div>
<p class="result-text result-text--small">FV</p>
</div>
</div>
<div class="chart-wrapper">
<canvas id="chartFinancial" class="chart chart--financial" height="335px"></canvas>
<div class="chart__legend chart__legend--padding-horizontal" id="chart__legend">
<p class="result-text result-text--small">0</p>
<p class="result-text result-text--small">2</p>
<p class="result-text result-text--small">4</p>
<p class="result-text result-text--small">6</p>
<p class="result-text result-text--small">8</p>
<p class="result-text result-text--small">10</p>
<p class="result-text result-text--small">12</p>
</div>
</div>
<div class="result-table__dialog">
<button class="result-table__open">
<p class="result-table__open-text">Schedule</p>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.7071 7.29289L9.99999 10.5858L13.2929 7.29289C13.6834 6.90237 14.3166 6.90237 14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L10.7071 12.7071C10.3166 13.0976 9.68341 13.0976 9.29289 12.7071L5.29289 8.70711C4.90237 8.31658 4.90237 7.68342 5.29289 7.29289Z" fill="#312E81"></path>
</svg>
</button>
<div class="result-table__wrapper">
<table class="result-table">
<thead>
<tr>
<th class="indigo text-center">#</th>
<th class="indigo">PV</th>
<th class="indigo">PMT</th>
<th class="indigo">INTEREST</th>
<th class="indigo">FV</th>
</tr>
</thead>
<tbody id="annual-results">
<tr>
<td class="text-center">1</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">2</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">3</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">4</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">5</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">6</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<th class="indigo text-center" colspan="5">Year 1 End</th>
</tr>
<tr>
<td class="text-center">1</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">2</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">3</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">4</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">5</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
<tr>
<td class="text-center">6</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
<td>$235,022.69</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</span>
</div>
</div>
<script async src="./assets/js/lib/math.min.js"></script>
<script defer src="./assets/js/functions.js"></script>
</body>
</html>