# Compound interest with variable contributions

**URL:** <https://community.glideapps.com/t/compound-interest-with-variable-contributions/87026>\
**Category:** Ask for Help\
**Created:** [May 8, 2026, 12:48pm UTC](https://community.glideapps.com/t/compound-interest-with-variable-contributions/87026 "2026-05-08T12:48:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Forsyth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonathan_forsyth/32/95045_2.png) [@Jonathan\_Forsyth](https://community.glideapps.com/u/Jonathan_Forsyth)\
**Post date:** [May 8, 2026, 12:48pm UTC](https://community.glideapps.com/t/compound-interest-with-variable-contributions/87026/1 "2026-05-08T12:48:40Z")

</div>

I am struggling to find a way to create a compound interest calculator that can handle variable contributions month to month. Because excel can reference the cell in a row above, I am able to write formulas that allow for September monthly contributions to a 401k be $xx.xx and October to be less or $0 due to the IRS contribution limit being reached in September. Or for contributions to be $10k in 2027 but in 2028 the contributions are higher because the hourly wage increased or the amount of hours worked increased. I can’t find a way to avoid circular dependency in glide apps to achieve the same functionality.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 8, 2026, 2:19pm UTC](https://community.glideapps.com/t/compound-interest-with-variable-contributions/87026/2 "2026-05-08T14:19:55Z")

</div>

To do the same thing that you do in Excel, you probably want use case number 2 in this post to get a row number.

> [@How do I create an auto-incrementing row number with Glide Tables?](https://community.glideapps.com/t/how-do-i-create-an-auto-incrementing-row-number-with-glide-tables/39572):
>
> This is a question that comes up a lot, so creating this topic to use as a reference. Typically, there are two distinct use cases when it comes to auto-incrementing row numbers. Use Case 1: – We need to generate a Part Number, or an Order Number, or an Employee ID. Once the number is generated, it should never change, even if rows are deleted. – The general approach for this use case is to maintain a static counter, use it to craft a suitably formatted ID, and increment it by one every time…

Once you have that, create a math column to subtract 1 from that row number.

Then create a Single Value column, Get: ‘From start’, Row: ‘math column’, From: ‘Table-\>Whole Row’.

Finally create a lookup to retrieve the previous row value from the single value column.
