Would you like to create complex calculation formulas for your WordPress forms without writing code? With the WPForms AI feature and the Calculations addon, you can easily generate calculation formulas by simply describing what you want to calculate.
This guide will show you how to use WPForms AI to generate calculation formulas for your forms.
Requirements:
- You will need a Pro license level or higher to access the AI Calculations feature
- Ensure that you’ve installed the latest version of WPForms to meet the minimum required version for the Calculations addon.
- The Calculations addon must be installed and activated
Before getting started, you’ll first need to make sure WPForms is installed and activated on your WordPress site and that you’ve verified your license.
Accessing the WPForms AI Formula Generator
To start using WPForms AI for calculations, first, create your form and add all the necessary fields.
When setting up your form, be sure to add clear, descriptive labels to all fields. Instead of keeping default labels like ‘Single Line Text’ or ‘Number,’ rename them to specific terms like ‘Product Price,’ ‘Quantity,’ or ‘Discount Percentage.’ This helps the WPForms AI understand better which fields to use in your calculations.
Once you’ve added all the necessary fields to your form, select the field where you want to display the calculation result. Then, go to the Advanced tab and toggle the Enable Calculation option to the ON position.

Creating Calculation Formulas With WPForms AI
Once the Calculation option is enabled, click Generate Formula to open the WPForms AI chat interface.

In the chat dialog, you’ll see a prompt asking you to describe the formula you want to create. Enter your description in the text field at the bottom of the dialog.

As an example, you might enter a prompt like ‘Calculate total price based on product price and quantity combined with discount percentage’ into the text field. After that, hit the enter key or click the Send icon to proceed.

WPForms AI will then generate a formula based on your description.

Customizing WPForms AI Generated Formulas
After WPForms AI generates a formula, you can review it and request modifications if needed. The AI will display the formula along with an explanation of how it works and which field IDs are related to the fields in your form.
For example, you might type ‘include a 5% sales tax on the final price after the discount’ into the text field. After entering your request, hit the enter key or click the Send icon.

WPForms AI will then process your request and update the formula based on your feedback. It will also provide an explanation of the changes made to the formula.

You can continue refining the formula by sending additional prompts. For example, you might also want to add more specific instructions like ’round the final result to two decimal places’.

Once satisfied, click Insert Formula to apply it to your form field.

Validating and Fixing Formulas With AI
Once your formula is created or modified, you might want to validate it to ensure it works correctly. To do this, click the Validate Formula button in the form builder.
If the formula is valid, you’ll see a green checkmark indicating that everything is correct.

If the formula contains errors during validation, a popup with the error description will appear. Click Fix with AI to let WPForms AI resolve the issue automatically.

After clicking Fix with AI, the AI chat interface will open again, and WPForms AI will provide a corrected formula along with an explanation of what was wrong with the original formula.

Once you’re satisfied with the corrected formula, click the Insert Formula button to apply it to your form field.

Frequently Asked Questions
Below, we’ve answered some of the top questions about using WPForms AI with the Calculations Addon to generate formulas.
How does WPForms AI know which fields to use in the formula?
WPForms AI analyzes the fields in your form and uses their IDs (e.g., $F1, $F2) in the generated formula. When describing your calculation, refer to fields by their labels so WPForms AI can easily identify which fields to use.
Can I edit the AI-generated formula manually after inserting it?
Yes, once you’ve inserted the formula into your form field, you can edit it manually in the formula builder just like any other WPForms calculation formula.
What should I do if I get an error saying “The provided form structure does not include the necessary fields”?
This means WPForms AI can’t generate the formula because some essential fields are missing from your form.
For example, if you’re trying to create a sales tax calculator but haven’t added fields for the amount and tax rate, you’ll need to add these required fields to your form first.
Can I use WPForms AI to fix formulas I created manually?
Yes! If you’ve written a formula manually but it has errors, you can use the Fix with AI feature after validation fails to have WPForms AI correct the formula for you.
That’s it! You now know how to use WPForms AI to generate calculation formulas for your forms.
Next, would you like to learn how to build your own formulas? Check out our guide on building formulas with the Calculations addon for more details and use cases.