JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Calculate Age based on birth dateAsked by hatzbs on November 11, 2015 at 11:39 AM
I would like to calculate age. For instance, I have a Date of Birth field, and an age field. I would like to automatically calculate the age of the person based on the Date of Birth. I attempted to use the calculate field, but I am sadly lost. :(
Assistance would be greatly appreciated.
I'm unable to understand properly the form you have. But you can try this sample form that I made: https://form.jotform.com/53144880775968?. To calculate the age based from the date of birth, here are the steps:
1. First, have two Datetime field. The 1st one will get the current date while the other is for the date of birth.
2. Add a form calculation widget as the age field. We will do the calculation there.
3. In my form calculation widget, this is the formula I have.
floor((current date - date of birth) / 365 days)
floor - this will round your number value downward. You can check this link for the reference: http://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference
Let us know if that works.
I am getting this in the age field after the calculation is made:
today - year =
Yuch. This is what I get in the age field when I try to run the calculation:
today - year =
It is because of your update a field value condition with just "today - year =" text in the formula. I have now updated it for you. Check the age calculation in your form now. It should now be working.
Unfortunately, the field is not updating. Doesn't put in the age in the field.
Well, I got it to work, sort of. :)
-16706 is the value being shown. I'm doing something wrong...
it is because you lack condition brackets in the formula of your condition. Here's how your condition looks like:
Here's how it should look like.
I hope this helps. Let us know if you need any further assistance. Thank you.
Hi, are you on the support team? I don't think so, so your rude comments are not welcome. If you are on the support team, then I will be double thinking my subscription to your product.
With that being said, it works. Many thanks to the support team for your assistance!