# Show age after user input date of birth

**URL:** <https://forum.adalo.com/t/show-age-after-user-input-date-of-birth/35517>\
**Category:** Get Help\
**Created:** [January 22, 2023, 5:59am UTC](https://forum.adalo.com/t/show-age-after-user-input-date-of-birth/35517 "2023-01-22T05:59:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NavD](https://avatars.discourse-cdn.com/v4/letter/n/d26b3c/32.png) [@NavD](https://forum.adalo.com/u/NavD)\
**Post date:** [January 22, 2023, 5:59am UTC](https://forum.adalo.com/t/show-age-after-user-input-date-of-birth/35517/1 "2023-01-22T05:59:58Z")

</div>

Hi,

I have users input their Date of Birth through a form using a Date Picker. The date gets saved in this format: MM/DD/YYYY. For example, 11/13/2019.

I want to calculate the age of the user. What formula might work for this?

I found this forum that helps answer this question but it doesn’t work correctly.  
Link: [Populating Age in Database](https://forum.adalo.com/t/populating-age-in-database/9237)

1st problem: It shows the age as a negative number. For example, -4.  
2nd problem: I also wasn’t sure what the date format should be in the formula. I set them both to the “Year Number”. It works but it was still negative.

![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/2/7/2733251bb5374d3b78c6abec78cd6fc94b7f506d.png)

Any help is appreciated! Thank you!

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 22, 2023, 10:09am UTC](https://forum.adalo.com/t/show-age-after-user-input-date-of-birth/35517/2 "2023-01-22T10:09:49Z")

</div>

Hi @NavD,

For remove negativeness you can use the **ABS function**!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/8/3/833658f46375b1d4324ab5cd83ce15d13ff22f13.png)

Here’s how I did it! : [Calculate Age.mp4 - Google Drive](https://drive.google.com/file/d/1R8T3OJB42X-EvqS6-JG53YeGS_uks78E/view?usp=share_link)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/a/1/a1575ab3f814968f4deea8a8101310d3b1fa1454.png)

Math Functions Adalo Docs : [How to Create a Custom Math Formula - Adalo Resources](https://help.adalo.com/component-basics/inserting-dynamic-text/how-to-create-a-custom-math-formula)

Thank you

---

<div class="post-metadata">

**Author:** ![NavD](https://avatars.discourse-cdn.com/v4/letter/n/d26b3c/32.png) [@NavD](https://forum.adalo.com/u/NavD)\
**Post date:** [January 22, 2023, 10:58pm UTC](https://forum.adalo.com/t/show-age-after-user-input-date-of-birth/35517/3 "2023-01-22T22:58:50Z")

</div>

Hi dilon\_perera, this worked perfectly! Thank you for your help.

The only thing I would add is that equation can be more accurate by adding .24 after 365. This helps when the date of birth is the same as the current date.

So, INT(ABS((Current Time - Birthday) / 365.24)).

I also liked your Quizzy app. I’m going to add a similar feature.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [February 1, 2023, 10:59pm UTC](https://forum.adalo.com/t/show-age-after-user-input-date-of-birth/35517/4 "2023-02-01T22:59:08Z")

</div>

Closed on February 1, 2023, 10:59pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
