--- title: "Perform Calculations on Date / Time Fields" slug: "perform-calculations-on-date-time-fields" description: "Learn to calculate time using Date and Time elements with Epoch Unix timestamps for reservations, age, and more. Simplify your calculations today!" updated: 2025-11-13T19:37:18Z published: 2025-11-13T19:37:18Z canonical: "www.civicplus.help/perform-calculations-on-date-time-fields" --- > ## Documentation Index > Fetch the complete documentation index at: https://www.civicplus.help/llms.txt > Use this file to discover all available pages before exploring further. # Perform Calculations on Date / Time Fields Date and Time elements can be used in calculations for a variety of circumstances such as calculating the number of days of a reservation or calculating a user's age. Learn more about the [Calculation Element](/process-automation/docs/calculation-element). Date and Time calculations use Epoch Unix timestamps which are represented as a number, specifically the number of milliseconds since January 1, 1970, Coordinated Universal Time (UTC). Meaning when calculating the difference between times you will need to divide the result in order to get the increment of time you are looking for. For example, in the 'Hours' bullet below, the difference between the end and start times is divided by 3,600,000 (the number of milliseconds in 1 hour). You will need to divide by the following numbers to get the applicable length of time in your calculation. Information on how to set up these formulas can be found in the instructions below. - **Hours:** divide by 3600000 - **Example Formula:** ROUND_UP(({ELEMENT:End_Time} - {ELEMENT:Start_Time) / 3600000) - **Days:** divide by 86400000 - **Example Formula:** ({ELEMENT:Date_of_Departure} - {ELEMENT:Date_of_Arrival}) / 86400000 - **Years:** divide by 31540000000 - **Example Formula:** ROUND_DOWN(({ELEMENT:Current_Date} - {ELEMENT:Date_of_Birth}) / 31540000000) ## Calculate Time In this example, we are calculating the difference between a start time and an end time within a day. The result displays the amount of time in hours. 1. [Create or edit an existing form](/process-automation/docs/create-manage-forms) and navigate to the **Builder** tab ![Builder tab at the top of the screen.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371445984407.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=vieCrvhY4Et1VwpKFCSsumx%2Ba1CDHUqqhhoMzM7Ac%2B8%3D) 2. Add your **Time** **Elements** to the form ![Time Elements on Builder tab.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371515107095.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=U7gwnmsOjTa4nRzqA2BCjpZA6M8R8JyF2ogp5Rt1%2FDU%3D) 3. Add a **Calculation Element![Calculation Element Type.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/24132937679511.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=CUFkR0FWBNTf7eekxYG1R3vNUmK7o7IzqcxeV1JWfyk%3D)** 4. Add a **Label** for the element ![Calculation Label field.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371624502807.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=Wa9pw728B02jcsOuTT8SlZXgCjp8wgYwO4EaWcBm2JQ%3D) 5. Under the **Calculation** field, select a **Rounding** option ![Round button on Calculation box.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371706085527.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=UHKg9fvKK83nmRzBfijLHZkxopE%2FGhEfuztFZC36WZ0%3D) - **ROUND:** Will round the result to the specified number of decimal places - **ROUND_UP:** Will round up the result to the nearest whole number - **ROUND_DOWN:** Will round down the result to the nearest whole number 6. Click inside the parentheses **()** and select the end time element from the **Insert Element** drop-down ![Insert Element drop-down.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371782013079.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=vSn6qFDoJh33mvbf%2Ff6eg8Jvr4j0ZoomGGpvreT8%2BxE%3D) 7. Add a minus sign ( **-** ) after the element bracket ![Minus sign after element.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371825251223.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=buwlqf%2FxTLqeg1S6sPoRUcmuqPKJ%2BQPj5H7mwNEYklE%3D) 8. Click **Insert Element** and select the start time element ![Insert Element drop-down.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371875394967.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=b7hqqqtR3oojpBe0pUQScH6xmN4sE%2F4WwR0pHXebZW0%3D) 9. Add a divide sign ( **/** ) after the parentheses ![Division sign after element bracket.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371982218135.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=xyZvSLu5SVDJNof8hI5%2FIDZ3uhjD69u%2F1T804Kyh%2F7o%3D) 10. Enter the following number to calculate the time in hours: **3600000![Calculation for hours.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19372419878295.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=AwwCXOqdsn5ejuMHAq4WccUaMbN2TOkZGcDyIP5UE9U%3D)** > [!WARNING] > **Note**: > > If you are using the **ROUND** function, you will need to add a comma and how many decimal places you would like the calculation to display. For example, **3600000, 2** will show two decimal places. If you do not want to show decimal places, we recommend using the **ROUND_UP** or **ROUND_DOWN** functions to round to the nearest whole number. 11. Add **parentheses** to the start of the formula (after the rounding option) and to the end of the formula ![Calculation formula example.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19372114309655.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=K27ljWEvE4cR68JSknWheoTHzjJrxE%2FhSecCRr7j2dA%3D) 12. In the **Calculation Content** field, add any additional context for end users such as the word "hours" ![Calculation Content field.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19372209081623.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=f1a09HhbQa46g%2FMiZgArR2O1JsPs9RdOey0qqptVmbA%3D) 13. Click the **Save** button in the top right corner ![Save button.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/24488076911383.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=ESd4jyY9TNmNY2UKw69orc0JETK4NNvCo8xcqlQhZ%2Fw%3D) 14. Your form will now calculate the total number of hours entered ![Time Calculation preview.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19372320806039.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=6YEZ0RBQbzCu4pDBWe8Sv3mzmTcSfrSeZoC7blnVhZ0%3D) 15. If needed, you can add [Conditional Logic](/process-automation/docs/conditional-logic) based on how many hours a user has selected. In the example below, we set up a Calculation element that will charge users a specific rate if the reservation is 4 hours or less. We also set up a separate calculation element that will charge users a different rate if the reservation is more than 4 hours. ![Calculation Condition Example.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19611595724823.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=UnN%2FuwaBuwAd3VZdgS9zn9DBSMio%2BTu%2Fk1hBbK37v0g%3D) ![Condition Example continued.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19611566858647.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=7xBE6Cg4edCaswzRV1oMUrecp6afHTlI3KCUMPS3u1o%3D) 16. The **Total Reservation Cost** will now reflect the user's selections ![Reservation Cost Hours Example.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19611701023895.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=kdgYB3wRKNsjgz88Fq6VofA4cr6ll8Rr2nYPHK2RLzA%3D) --- ## Calculate Days / Days and Time In this example, we are using a start date and an end date and calculating the amount of time between these different dates to display the amount of time in days as a result. 1. [Create or edit an existing form](/process-automation/docs/create-manage-forms) and navigate to the **Builder** tab ![Builder tab at the top of the screen.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371445984407.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=vieCrvhY4Et1VwpKFCSsumx%2Ba1CDHUqqhhoMzM7Ac%2B8%3D) 2. Add your **Date** elements or **Date and Time** elements to the form ![Date Elements.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19386377564183.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=k89RWLrhiTICscLq3B9LiCcczMt%2FC%2BK%2BrXDGTkG%2F9Rk%3D) 3. Add a **Calculation Element![Calculation Element Type.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/24132937679511.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=CUFkR0FWBNTf7eekxYG1R3vNUmK7o7IzqcxeV1JWfyk%3D)** 4. Add a **Label** for the element ![Calculation Label field.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19386451519255.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=wAKfL1MnbvXtKC04a9o6UC0xpbDY1sfX5whXzNZwn54%3D) 5. In the **Calculation** field, click **Insert Element** and select the end date element ![Insert Element drop-down.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19386818867223.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=7dMQErSkuC1Woz54JOdzZn%2B5KgUirLDxxoGMzrpNM7s%3D) 6. Add a **minus sign** after the element bracket ![Minus sign after the element bracket.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19386800801559.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=%2FEfxGExKthL92mMckF51a5%2BDxjDP%2Bj4InpG0IkvsA8A%3D) 7. Click **Insert Element** and select the start date element ![Insert Element Date of Arrival.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19386773595287.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=ac1bUdm3bq35xFL0xcja%2BTViH%2F665zRi%2BnlVxqFvVhw%3D) 8. Add **parentheses** around the elements ![Parentheses around the formula.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19386800008087.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=QWRchMzauQO7LwL7kjLqGCOBhdVTd0uOthivJWAbEds%3D) 9. After the last parenthesis, add a divide sign ( **/** ) and the number **86400000** to calculate the number of days**![Dividing by number to calculate days.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19386800015511.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=%2FiZC7u81y1lTJN1SbVFUB3CA0oLtzOZo60UBulE2Keo%3D)** 10. In the **Calculation Content** field, add any additional context for end users such as the word "days" ![Calculation Content textbox with total days of reservation noted.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19387484324247.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=Zx6I%2FyexmLIYn5iEXkulxjwyz%2FXQA%2Bx1RliaPE9zztY%3D) 11. Click the **Save** button in the top right corner ![Save button.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/24488076911383.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=ESd4jyY9TNmNY2UKw69orc0JETK4NNvCo8xcqlQhZ%2Fw%3D) 12. Your form will now calculate the total number of days entered ![Preview of the Date Calculation.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19387482198423.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=8JhZZkhqGivFefZiP9vaYZfIAN5JMrGd0bx%2FB6dppKg%3D) > [!WARNING] > **Note**: > > If you use the Date and Time element, the result will display decimal points for the number of hours.![Date and Time calculation preview.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19394531574679.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=sCCJxTDBKsBEOdYhGQiYeD87%2BQNupIGCfmzoYxQeTGs%3D)You can use the **ROUND_UP** or **ROUND_DOWN** functions to round the result to the nearest whole number.![PADS Calculation dates rounding.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/23452839863319.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=ZhRrQbGfBiZU%2Fa6JZ8%2F0z%2FoFcBV%2B0XgQOw4eYjv5SS4%3D) 13. If needed, you can add [Conditional Logic](/process-automation/docs/conditional-logic) based on how many days a user has selected. In the example below, we set up a Calculation element that will charge users a specific rate if the reservation is 2 days or less. We also set up a separate calculation element that will charge users a different rate if the reservation is more than 2 days. ![Calculation Condition Example Days](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19614767072023.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=4X%2FPF9WkXijcu7s7PDwTs%2Fi2dVYJTjG1%2FH1tgpBBwzU%3D) ![Calculation Condition Example Days continued.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19614761277975.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=xdxMFnw7F9RO3nf3ehCOAF%2FKuv5xDO4ly%2FmqeM%2BPpF8%3D) 14. The **Total Reservation Cost** will now reflect the user's selections ![Example Cost for Number of Days.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19614798834071.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=KqVU6dZBmEIdS2JCsylgtpx0Qp%2BqcRVFy%2FLvKdUMPFE%3D) --- ## Calculate Years In this example, we are calculating the difference in time between the current date and an entered date. This can be used to calculate a user's age. 1. [Create or edit an existing form](/process-automation/docs/create-manage-forms) and navigate to the **Builder** tab ![Builder tab at the top of the screen.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19371445984407.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=vieCrvhY4Et1VwpKFCSsumx%2Ba1CDHUqqhhoMzM7Ac%2B8%3D) 2. Add your **Date Elements** to the form ![Date elements for the current date and date of birth.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19389823829143.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=hA9gRRu9v%2FZMU5IncrEIFx2VI3%2FbWxhbrBjPhEeyUWw%3D) > [!WARNING] > **Note**: > > If you want one of the date elements to reflect the current date, ensure the **Default Date** field is set to **Form Viewed** and toggle on **Read Only**. ![Default Date field on the Calculation element.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19389807111831.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=AwiSUeTaxDOnsSPMcHJrTLvNcOtCHVAUR1BcvhB02bM%3D) 3. Add a **Calculation Element![Calculation Element Type.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/24132937679511.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=CUFkR0FWBNTf7eekxYG1R3vNUmK7o7IzqcxeV1JWfyk%3D)** 4. Add a **Label** for the element ![Calculation Label field.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19389878661271.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=QcFsnLKjAygUrMpn8Ge9xjdN0rPdMUtuO1L4zAVRDaI%3D) 5. Under the **Calculation** field, select a **Rounding** option ![Round button on the calculation box.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19393176557975.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=9hsSN9gZ4Y5QtyT66JBpAKPSxhKpddMA5oSLX32gpYE%3D) - **ROUND:** Will round the result to the specified number of decimal places - **ROUND_UP:** Will round up the result to the nearest whole number - **ROUND_DOWN:** Will round down the result to the nearest whole number 6. Click inside the parentheses **()** and select the current date element from the **Insert Element** drop-down ![Insert Current Date element from the drop-down.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19393176564119.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=r1MovzVyLNGPBlWS6cuzWPyAwiLmVP4Cn0w%2F5GdSLIA%3D) 7. Add a **minus sign** ( **-** ) after the element bracket **}![Minus Sign after the element bracket.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19393360301079.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=%2B5hDrkw2M2KuhCZb%2BgVqjKv6AwuG2UClh1tQu37g64w%3D)** 8. Click **Insert Element** and select the other date element**![Date of Birth selected in the Insert Element drop-down.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19393360306967.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=xXHa%2BANeJZldo1ZqzY07d4W2aynXDQLzY1jzzn7MNPI%3D)** 9. Add a divide sign **/** after the parentheses ![Divide Sign after the element.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19393457711639.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=VL7DniWh%2FlwBToB6XfkhQutlW%2BFhcaDNhkWp6SBBs08%3D) 10. Enter the following numbers to calculate the time in years: **31540000000![Calculation number for years.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19393787971607.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=GQPPuGDV5qoGisGH6toblThebqL5gSKt%2BP71bhuXAhc%3D)** > [!WARNING] > **Note**: > > If you are using the **ROUND** function, you will need to add a comma and how many decimal places you would like the calculation to display. For example, **31540000000, 1** will show one decimal place. If you do not want to show decimal places, we recommend using the **ROUND_UP** or **ROUND_DOWN** functions to round to the nearest whole number. For example, instead of showing someone's age as 30.6 years, it would display as 31 or 30. 11. Add **parentheses ()** to the start of the formula (after the rounding option) and to the end of the formula ![Calculation Year Formula.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19393841228311.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=22%2BW9nsANtl5ea8j%2BCm9P5qDhaFTvDo5n3kYQnn6Vj0%3D) > [!WARNING] > **Note**: > > The example formula above is: **ROUND_DOWN(({ELEMENT:Current_Date} - {ELEMENT:Date_of_Birth}) / 31540000000)**. Replace the Element names with the name of the elements in your form. 12. In the **Calculation Content** field, add any additional context for end users ![Calculation Content for the age in years.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19394194840983.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=RKacSse7gjlQTlsJUiCwWZBU0GB1YtPpSkeS4dZ%2Fvh4%3D) 13. Click the **Save** button in the top right corner ![Save button.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/24488076911383.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=ESd4jyY9TNmNY2UKw69orc0JETK4NNvCo8xcqlQhZ%2Fw%3D) 14. Your form will now calculate the total number of years ![Preview of the calculation for years.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19394240318487.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=TpmIq0dxhu80SSfrKuSfgBkDa3ZRkOEnl5UnSUldoJ4%3D) 15. If needed, you can add [Conditional Logic](/process-automation/docs/conditional-logic) based on a user's age. In the example below, we set up a Calculation element that will charge users a specific rate if they are age 55 or older. We also set up a separate calculation element that will charge users a different rate if they are younger than 55. ![Calculation Condition Year Example.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19613306753303.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=f8V2yG2TkQpiK%2F26bqQ2YkseIsX0mlCb3xrwxVgGWLA%3D) ![PADS Calculation Condition Year Example continued.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19613270121623.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=VeEb%2BaAGGKXgdA3NCdtOgnwu8MrVT6CkPhJQJwJJcno%3D) 16. The **Total Registration Cost** will now reflect the user's age selection ![Condition Year Preview.](https://cdn.us.document360.io/17dc564a-8310-4f61-b929-1bd73b36e158/Images/Documentation/19613358748439.png?sv=2026-02-06&spr=https&st=2026-11-22T12%3A51%3A26Z&se=2026-11-22T13%3A51%3A26Z&sr=b&sp=r&sig=eEZskazfURA55MtA4jwmmrnwvqQfgbZNJVqKgY9jbjw%3D)