Using Gravity Forms to collect numerical data? Now you can perform advanced calculations on that data. Display the number of form submissions, calculate the average age of your respondents, build a front-end calculator, display the total amount donated, and more!
Uncover game-changing insights
Your Gravity Forms data is a veritable treasure trove of information, so why let that go to waste? GravityMath integrates with Gravity Forms to help you extract important insights from the data you collect. Build a mortgage calculator, analyze your business data, create product reports, work out the ROI of your marketing campaigns, and more!
Display calculations anywhere on your website
Using the powerful [gravitymath] shortcode, you can output calculations anywhere on your WordPress website. Embed your calculations inside Gravity Forms confirmations, notifications, widgets, pages, posts – literally anywhere!
Build dynamic applications
Already got GravityView installed? You can use [gravitymath] inside a View to add footer calculations to your table layouts (like average, sum, max, min, etc), create calculated columns, perform calculations for all visible entries, and more.
Perform advanced calculations on your Gravity Forms data
Powered by Hoa Math, the best open source math library
Complex calculations made easy
Using GravityMath, you can perform advanced calculations without breaking a sweat. Need to calculate the logarithm, cube root, or arc tangent of a number? No problem! GravityMath also supports mathematical constants such as ‘pi’ and ‘e’. Gravity Forms is not required.
Build automated calculators
Build mathematical apps with Gravity Forms and impress your clients by automating manual processes. Calculate the total cost of an order, the average age of your respondents, the highest order amount, the monthly payment on a loan, the value of an insurance quote, and more!
Easily debug errors
You know that feeling when things should work but for some reason, they don’t? GravityMath includes built-in debugging so you know when something goes wrong, and why.
Output calculations with a shortcode
Perform simple arithmetic operations in WordPress or take things further with complex calculations. GravityMath makes this easy using the intuitive [gravitymath] shortcode. If you get stuck, simply consult our extensive user documentation.
Export your Gravity Forms data to Excel, CSV, or PDF using a secure, shareable download link. Automatically send reports to Dropbox, FTP, and local storage.
Create beautiful charts and graphs using your Gravity Forms data; build data dashboards, create business reports, visualize questionnaire results and more.
The best way to import entries to Gravity Forms. Easily transfer your data, auto-create forms, and update existing entries with this powerful, easy-to-use tool.
Does GravityMath allow you to perform calculations inside a form?
No. GravityMath allows you to perform calculations on existing Gravity Forms entries. However, you can add calculations to Gravity Forms confirmation messages.
Does GravityMath support advanced functions, like logarithms?
Yes! The [gravitymath] shortcode supports a range of mathematical functions including sine, cosine, log, square root, and much more.
Can I use GravityMath to build a loan calculator?
Yes. Although GravityMath doesn’t work inside a form, it can be used to display calculation results inside the confirmation message once the form has been submitted. Check out this tutorial for more information.
Can I perform time calculations using GravityMath?
GravityMath allows you to calculate durations (hh:mm:ss) including fastest time, slowest time, and average time. However, GravityMath cannot calculate dates and times (e.g. dd/mm/yy h:m:s + dd/mm/yy h:m:s).
Can I use data from different forms in one calculation?
Yes! You can use data from separate forms in a single calculation by nesting multiple [gravitymath] shortcodes. Read this article to learn more.
Excellent interfaces, concise documentation, and a year later I still have the “Math by GravityView” song stuck in my head!
GravityMath Changelog
2.7 on November 21, 2024
This release adds support for Hidden fields in summary reports and addresses a non-critical PHP notice in WordPress 6.7 and newer.
🚀 Added
Support for Hidden fields in summary reports.
🐛 Fixed
PHP notice in WordPress 6.7 caused by initializing product translations too early.
This hotfix release addresses a fatal error that can occur when creating a new View.
🐛 Fixed
Fatal error when creating a new View under certain conditions.
2.5 on October 1, 2024
This release introduces new tools for creating summary reports from your form data, enabling you to perform calculations across entries for deeper insights. It also includes minor fixes and security improvements. Read the announcement.
🚀 Added
Option to display calculation summaries using a block, shortcode, or widget.
Supports grouping entries by fields, performing mathematical operations (e.g., Count, Sum, Average), sorting and displaying top results.
The summaries can be shown for all View entries or only those displayed on the current page.
🐛 Fixed
PHP 8.2 deprecation notice.
🔐 Security
The [gravitymath] shortcode now requires a secret attribute when the scope is set to view and the View has Enhanced Security enabled.
Added: gk/gravitymath/summary/data filter to modify the calculation data before rendering the summary table.
Added: gk/gravitymath/summary/template filter to modify the template used to display the summary table.
Added: gk/gravitymath/summary/headers filter to modify the table headers before rendering the summary table.
2.4.1 on January 25, 2024
This release fixes a bug in the [gravitymath] shortcode's math calculations and updates the Foundation framework to improve support for sites that use object caching plugins.
🐛 Fixed
An issue with math calculations in the [gravitymath] shortcode not functioning correctly unless scoped to a specific form or View.
Improved the setting and retrieval of transients when using object cache plugins.
Fixed a JavaScript warning that appeared during the deactivation of license keys.
2.4.0 on January 11, 2024
This release introduces new functionality for multi-select fields and resolves several issues related to footer calculations. It also features an updated version of Foundation that offers performance improvements and enhanced translation management.
🚀 Added
Ability to calculate individual selected or unselected choices of a multi-select field.
New option to position the footer calculation row either above or below the table's footer row.
🐛 Fixed
Survey field (Likert type) score not being calculated correctly.
Duration (text field with "hh:mm:ss" or "mm:ss" input mask) calculations not working correctly when scope is set to "form".
Counting unselected or unchecked radio/checkbox/select field inputs would return "0" when scope is set to "form".
Shipping field calculation producing incorrect results when scope is set to "form".
🔄 Updated
Foundation to version 1.2.6
- Improved performance.
- Enhanced the loading and caching of plugin translations.
- All translations are now loaded from the wp-content/languages/plugins/<site ID> directory.
- Added support for installing plugin translations via WP-CLI (WordPress Command Line Interface).
- Fixed an issue where deactivating a product on one site in a multisite environment caused this product's translations to be deleted across all sites.
- Fixed PHP 8.2 deprecation warnings.
- Fixed a PHP warning encountered when updating plugins from the WordPress Plugins page.
Added: gk/gravitymath/scope/form/transform-meta-value filter to modify the SQL statement used to transform the meta value for complex fields such as multi-row Survey (Likert) or Product with user-defined price
Added: gk/gravitymath/table-footer-calculation/supported-fields-schema filter to modify the list of View fields that support table footer calculations
Added: An {entry_count} Merge Tag you can use inside math formula as well as throughout Gravity Forms and GravityView! Read about the {entry_count} Merge Tag
Improved: Execution time when a Math filter is used on large data sets
Fixed: Incorrect results returned by min/max/avg/sum operations
Fixed: Calculations on non-numeric fields (e.g., product price) would not work in View widget areas
Fixed: Only using one page of results were used when calculating scope="view"
Logging improvements!
New: Not sure why your Math formula isn't working, but you don't want to modify the shortcode? Administrators can now debug Math formulae from the front-end by adding ?gv_math_debug=true to the URL.
Added: Better debugging information is now shown, including the contents of the formula before and after it was processed.
Improved: Notices are now grouped for each shortcode, making it easy to debug.
Fixed: "Additional info" shown when debugging results not displaying when clicked.
Fixed: Display user notices only when notices shortcode attribute is set.
1.3.2 on April 6, 2020
Fixed: If using scope=form as well as a filter, only the first 20 entries in the form were used in calculations
1.3.1 on March 5, 2020
Fixed: Shortcode not working when used inside GravityView DataTables layouts
Updated: French translation
1.3 on January 29, 2020
Fixed: The [gvmath] shortcode not working properly inside GravityView [gvlogic] shortcodes
Fixed: Potential errors when editing content in Gutenberg editor
Fixed: Potential error when using Math while running Gravity Forms < 2.3 and GravityView < 2.5
Fixed: Properly handles dates passed via Merge Tags
Added: Support for Gravity Forms Merge Tags in the filter attribute (when using scope="form")
Developer Updates:
Added: gravityview/math/debug filter to modify whether debugging is on or off. Return false to disable debugging. Note: Viewing debugging requires edit_others_posts capability.
1.2 on May 10, 2019
The plugin now requires PHP 7.1
Added: Filtering on form and view scopes. This will filter the entries in the scope by the specified values. Read more about filtering.
Fixed: SQRT_PI, SQRT_{Number} functionality
Added: Russian Translation (thanks, Viktor S) and Ukrainian translation (thanks, Dariusz Zielonka!)
Updated: Chinese translation (thanks, Edi Weigh!)
1.1.1 on May 8, 2018
Fixed: Aggregate form data not calculating with Gravity Forms 2.3
Fixed: .mo translation files weren't being generated
Updated: Dutch, Turkish, and Spanish translations (thanks, jplobaton, SilverXp, and suhakaralar!)
1.1 on April 28, 2018
Fixed: Compatibility with Gravity Forms 2.3
Updated: Dutch and Turkish translations
1.0.3 on May 24, 2017
Fixed: Don't link to entry in debug mode if the entry doesn't exist 👻
Fixed: Incorrect argument passed to Gravity Forms Add-On registration function