Use reduce()
, like this:
=let(
start, 10000,
increment, 10000,
percent, 10%,
n, 12,
reduce(start, sequence(n), lambda(acc, i,
(acc + increment) * (percent + 100%)
))
)
For a step-to-step breakdown of how the result progresses from period to period, replace reduce()
with scan()
, or use this formula that creates a two-column table to show how it goes:
=let(
start, 10000,
increment, 10000,
percent, 10%,
n, 12,
reduce({ start, 0 }, sequence(n), lambda(acc, i, let(
principal, single(chooserows(acc, -1)),
newPrincipal, (principal + increment) * (percent + 100%),
vstack(
acc,
hstack(newPrincipal, i)
)
)))
)
principal |
period |
10,000.00 |
0 |
22,000.00 |
1 |
35,200.00 |
2 |
49,720.00 |
3 |
65,692.00 |
4 |
83,261.20 |
5 |
102,587.32 |
6 |
123,846.05 |
7 |
147,230.66 |
8 |
172,953.72 |
9 |
201,249.10 |
10 |
232,374.00 |
11 |
266,611.41 |
12 |
See
let(),
reduce()
and
sequence().