how do i calculate age

  • billflinn
    Asked on February 15, 2016 at 6:20 PM
  • Chriistian Jotform Support
    Replied on February 16, 2016 at 2:56 AM

    If you want to calculate the age in your form, simply follow the steps below:

    1. Add two date fields, one for the birthday and one for the current date

    how do i calculate age Image 1 Screenshot 60

    2. Click on the Today field and on the form builder menu, select Default Date > Current

    This sets the default date of today field to the current date.

    how do i calculate age Image 2 Screenshot 71

    3. Now add the Form Calculation Widget, then click the Wand Icon to open the wizard

    how do i calculate age Image 3 Screenshot 82

    4. Follow this guide on how to perform calculations using the calculation widget: How to perform calculation in the form?

    Use this formula to get the age: (todayField - birthdateField) / 365

    Then click Show Advanced Options

    how do i calculate age Image 4 Screenshot 93

    5. Make sure that the decimal places is set to 0.

    how do i calculate age Image 5 Screenshot 104

    You're all set. You can check out this form to see the calculation in action: https://form.jotform.com/60461473281958

    If you like, you can clone it to your account by following this guide: How To Clone A Form

    Let us know if you need further assistance.

  • excelconsulting
    Replied on February 22, 2016 at 12:00 PM

    Hi!

    The above provided example does not provide an accurate answer. For instance, if I set the birth date to 24 Feb 1998, it gives an age of 18, which I will only reach after 2 days..

     

    Any solution to this?

  • Kevin Support Team Lead
    Replied on February 22, 2016 at 1:05 PM

    @excelconsulting, 

    I have moved your question to this thread: http://www.jotform.com/answers/778200

    We will assist you there.