With the gwp_word_count merge tag modifier for Gravity Forms it is possible to use the word count value of a text field in a formula. This way you can create a flexible Pay per Word calculation based on the amount of words in a text field.
The gwp_word_count modifier will become available after installing the GravityWP – Advanced Merge Tags Add-On.
In this tutorial we will build a pay per word form for a news paper which sells text ads, with a base price of $25,- and $0.75 per word. Here is a step by step walkthrough:
Step 1: Create a new form with 3 fields:
- One Paragraph text field
- Two Number fields

Step 2: Assign the following labels to each field:
- Advertisement Text
- Number of words
- Total Price

Step 3: Set up the word counter
Select the ‘Number of words’ field and tick the ‘Enable Calculation’ option like so:

A formula field appears. Here we can enter merge tags and basic arithmetic operators to create calculations. The merge tags are the variables which represent a field value. For example:
{Advertisement Text:1}
Normally it would make no sense to add the merge tag of a text field here, as you can’t calculate with non-numeric values. That’s why we also add a merge tag modifier to the merge tag, in this case the ‘gwp_word_count’ modifier:
{Advertisement Text:1:gwp_word_count}
This modifier ensures the merge tag does not return text, but the number of words instead. This advanced merge tag modifier is only available if you have the Advanced Merge Tags addon installed and active.
Now you have a field word count itself ready. Now we will need to address the actual pay per word calculation.
Step 4: calculate the price based on the amount of words
For this step, we edit the Number field we created with the ‘Total Price’ label. Instead of the default format (9,999.99), we select the Currency format. Also, we enable the calculation for this field.
In this example, we will use the number 25 as the starting price. You can replace this number with any value of your choice or remove it entirely. Add a plus sign (+) after the number to indicate that it will be added to the price.
The next step is to include the merge tag for the words. To do this, click on “Insert Merge Tag” and select the name of the previous number field that we used to calculate the word count.
Next, we will use 0.75 for the price per word. After the merge tag, type “* 0.75” to indicate that each word should be multiplied by 0.75 and added to the product price. This means that each word adds $0.75 to the price. Make sure to use a dot (.) as the decimal separator, not a comma. The settings should look like this:

Now we are ready to go. Save your form and try it out.
Our Premium add-ons for Gravity Forms
n8n Connector
Connect Gravity Forms to n8n and automate your workflows with secure, flexible, and powerful webhooks. Go beyond simple notifications and build advanced, two-way automations.
All Entries
All your new Gravity Forms entries in one central place. Stop navigating between multiple forms to find new entries. Get immediate oversight and full control with a powerful, unified dashboard.
Entry to Database
Integrates Gravity Forms with internal or external databases, offering flexible mapping of form fields to database columns and real-time synchronization between entries and database rows.
DateTime Field
The GravityWP - DateTime Field add-on adds a dedicated Date/Time field to Gravity Forms so users can enter both a date and a time in a single input.
Read tutorials about
Gravity Forms Airtable Integration: Create Records From Form Submissions
Learn how to build a Gravity Forms Airtable integration with GravityWP API Connector. Send form submissions to Airtable, create new records automatically, and save the returned Airtable Record ID and response back to Gravity Forms.
Gravity Forms Asana Integration: Create Tasks From Form Submissions
Learn how to connect Gravity Forms to Asana with GravityWP API Connector. This tested workflow creates Asana tasks from form submissions and saves the returned task ID and URL back to Gravity Forms.
Gravity Forms Google Calendar Integration: Create Events From Form Submissions
Connect Gravity Forms to Google Calendar with GravityWP API Connector. Learn how to create calendar events from form submissions, map event details, configure OAuth 2.0, handle time zones, and save the returned Event ID and URL.
Gravity Forms Notion Integration: Create Database Pages Without Zapier
Connect Gravity Forms to Notion without Zapier. This tested tutorial shows how to create Notion database pages from form submissions and save the returned page ID, URL, creation time, and API response.