# Rent due calculation

**URL:** <https://community.glideapps.com/t/rent-due-calculation/66364>\
**Category:** Ask for Help\
**Created:** [September 20, 2023, 1:31pm UTC](https://community.glideapps.com/t/rent-due-calculation/66364 "2023-09-20T13:31:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahassen](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@ahassen](https://community.glideapps.com/u/ahassen)\
**Post date:** [September 20, 2023, 1:31pm UTC](https://community.glideapps.com/t/rent-due-calculation/66364/1 "2023-09-20T13:31:42Z")

</div>

I have a column for rent start date, rent end date, payment schedule ie quarterly semi and annual and a total rent for a year contract. I want to create a list that would list due amount 30 days before due date. Could anyone help please

thanks in advance

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 21, 2023, 1:05am UTC](https://community.glideapps.com/t/rent-due-calculation/66364/2 "2023-09-21T01:05:36Z")

</div>

Just an idea here, you might have to dig in more to test if it’s viable:

- Based on whether the schedule is quarterly, semi-annual or annual, divide the rent amount so you can have a “due amount” to show.

- Use JavaScript or something that works to calculate the “due dates” based on the schedule. Say I have a semi-annual rent, starts on 1st Oct 2023 and ends on 1st Oct 2024, the code would give me the due dates being 1st April 2024 and 1st Oct 2024.

- Use another JavaScript column to calculate the “next due date” based on current time, and a math column to calculate the difference between that next due date and the current date.

- Show the due amount if the difference is less than or equal to 30 and greater than -1. Hide it when the user has paid.
