**hatzbs**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.

**Charlie**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-ReferenceLet us know if that works.

**hatzbs**I am getting this in the age field after the calculation is made:

today - year =

**hatzbs**Yuch. This is what I get in the age field when I try to run the calculation:

today - year =

...- JotForm Support
**EltonCris**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.

**hatzbs**Unfortunately, the field is not updating. Doesn't put in the age in the field.

**hatzbs**Well, I got it to work, sort of. :)

-16706 is the value being shown. I'm doing something wrong...

- JotForm Support
**Mike_G**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.

**hatzbs**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!

**carolinaruggerfest**Just came across this thread as I needed to know how to do this. Thanks

**Mike_G!****hatzbs --**Not sure how you viewed his response as rude in any way shape or form. There is nothing about the response from**Mike_G**that even remotely seems rude.