🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

How can we help you?

Find answers, tutorials, and guides to get the most out of Gravity Extra add-ons. (DEV Preview)

Gravity Forms Date/Time Calculator Premium Add-on

Last updated: October 3, 2026 • Author: admin
Table of Contents

Video walkthrough

Calculate Days Between Dates in Gravity Forms (Incl. Working Days)
Video walkthrough: counting calendar days and working days between two Gravity Forms date fields with Date/Time Calculator. Watch on YouTube

The Gravity Forms Date/Time Calculator Premium Add-on enables real-time mathematical calculations using native Date and Time fields directly inside Gravity Forms. Whether you need to compute elapsed calendar days, calculate client age from a date of birth, filter out weekend days for project SLAs, or charge dynamic rental rates based on duration, this add-on executes accurate client-side and server-side arithmetic without complex custom JavaScript or expensive middleware.

Pillar 1: Overview & Key Capabilities

By default, Gravity Forms calculation formulas only support standard Number and Product fields. The Date/Time Calculator Add-on bridges this gap by automatically converting calendar dates and times into standardized timestamps and duration units. Key capabilities include:

  • Full Arithmetic Math: Add, subtract, and multiply date and time fields within standard calculation formulas.
  • Automated Age Computation: Instant calculation of a person’s current age using the {field_id:age} modifier.
  • Business Days vs. Weekend Days: Count working days (Monday–Friday) or weekend days (Saturday–Sunday) between any two dates using {weekdays:...} and {weekendDays:...}.
  • Flexible Output Units: Output differences seamlessly in Seconds, Minutes, Hours, Days, Weeks, or Months.
  • Dynamic Duration-Based Pricing: Multiply booking or rental durations directly against hourly or daily rates.
  • Real-Time Frontend Evaluation: Formulas update instantly in the user’s browser as dates and times are selected.

Pillar 2: System Requirements & Installation

Before installing the add-on, ensure your hosting environment meets the following specifications:

  • WordPress 6.0 or higher.
  • Gravity Forms 2.5 or higher.
  • PHP 7.4 or higher (fully compatible with PHP 8.1, 8.2, and 8.3).

To install the plugin:

  1. Log into your GravityExtra Account and download the plugin ZIP archive.
  2. Navigate to Plugins → Add New → Upload Plugin in your WordPress admin dashboard.
  3. Select the downloaded ZIP file and click Install Now, then click Activate Plugin.

Pillar 3: Step-by-Step Configuration Guide

Follow these detailed steps to incorporate date and time calculations into your forms:

Step 1: Add Date and Time Input Fields

Open your form in the Gravity Forms editor. Drag and drop your desired Date or Time fields into the form canvas. For instance, add a “Start Date” (or “Birth Date”) and an “End Date” (or “Target Date”).

Gravity Forms Date Time Calculator Field Editor

Step 2: Add a Number or Total Field and Enable Calculation

Add a standard Number or Total field where you want the calculated result to appear. In the field settings on the right panel, check the Enable Calculation checkbox.

Enable Calculation in Gravity Forms Number Field

Step 3: Select Your Desired Output Unit

Under the field calculation settings, locate the Unit Calculator setting. Choose how you want the duration converted and displayed: Days, Hours, Minutes, or Seconds.

Select Unit Calculator in Field Settings

Step 4: Build Your Calculation Formula

Use standard arithmetic operators and merge tags to define your formula. You can subtract two dates ({End Date:2} - {Start Date:1}), use modifiers like :age, or leverage working days functions.

Building Calculation Formula in Gravity Forms

Step 5: Configure Age Calculation Formula

To calculate a user’s age from a Birth Date field, append the :age modifier to the date merge tag. For example, {Birth Date:1:age} automatically calculates age in completed years.

Configure Age Calculation Formula

Step 6: Configure Working Days and Weekend Days Formulas

To count working business days or weekend intervals between two date fields, use the specialized function tags: {weekdays:{Start Date:1},{End Date:2}} or {weekendDays:{Start Date:1},{End Date:2}}.

Configure Weekdays and Weekend Days Calculation Formula

Pillar 4: Merge Tag & Formula Syntax Reference

Below is the complete reference guide for supported merge tags and calculation syntax:

Merge Tag / Syntax Formula Example Description & Output
{End:2} - {Start:1} {Check-out:3} - {Check-in:2} Calculates total elapsed interval. Output unit depends on Unit Calculator setting (Days, Hours, etc.).
{field_id:age} {Birth Date:1:age} Computes user’s age in completed calendar years relative to today.
{weekdays:{start},{end}} {weekdays:{Start:1},{End:2}} Calculates total business working days (Monday through Friday), strictly excluding weekends.
{weekendDays:{start},{end}} {weekendDays:{Start:1},{End:2}} Counts total Saturday and Sunday days occurring within the specified date range.
{today} & {now} {Event Date:4} - {today} Injects today’s midnight timestamp or current real-time timestamp into calculation.

Pillar 5: Practical Real-World Implementation Recipes

Recipe 1: Equipment Rental Pricing with Dynamic Day Rates

To compute total rental charges based on selected pickup and return dates with a $50/day fee and $100 deposit:



(({Return Date:3} - {Pickup Date:2}) * 50) + 100

Recipe 2: Legal & Healthcare Age Verification Gate

To verify if an applicant meets the minimum age requirement of 18 years:

  1. Create a Number calculation field labeled “Applicant Age” with formula: {Date of Birth:1:age}.
  2. Add a Section Break or Consent field with conditional logic: Show if Applicant Age is greater than or equal to 18.
  3. Add an alert message: Show if Applicant Age is less than 18.

Recipe 3: Project Delivery SLA Estimator (Business Days Only)

To quote project delivery costs based solely on working business days at $250/day:



{weekdays:{Start Date:1},{Delivery Date:2}} * 250

Pillar 6: Common Pitfalls & Troubleshooting

  • Negative Duration Results: If a user selects an End Date that precedes the Start Date, standard subtraction produces a negative number. Use Gravity Forms conditional logic or the Date Range Selection Add-on to enforce that End Date must be greater than Start Date.
  • Time Field 12-Hour vs. 24-Hour Formats: The add-on natively handles AM/PM modifiers when converting time inputs to timestamps. Ensure both hour and minute subfields are filled for valid calculations.
  • Browser Cache on Field Edits: When modifying calculation formulas in the form editor, clear your browser cache and purge site object cache (wp cache flush) so updated JavaScript recalculation scripts load fresh.

Pillar 7: Get the Add-on

Ready to Add Date & Time Math to Gravity Forms?

Calculate durations, business days, and eligibility ages natively in your forms with instant real-time evaluation and zero recurring middleware fees.

Was this article helpful?

Let us know how we can improve our docs.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr