Perform Calculations | Formula Field - Zoho Forms

Using the Formula Field

Overview

Make your form a math wiz by allowing it to perform calculations. You can total up costs, process grade quizzes, apply discounts, and more! 

Use the  Formula  field to set up any form calculation. When your respondents fill in the form, calculations will be performed based on their input. The answer will be displayed in the field you have entered your formula in.

Using the Formula field you can,

  • Perform mathematical operations such as addition, subtraction, multiplication, and division 
  • Use certain  math functions  to calculate differences between two times, dates, and more 
  • Set up conditional calculations  to perform calculations based on the respondent's answers  

How to configure a Formula field

To add a formula field to your form,

  1. Click the Formula  field under the Form Fields section in the left pane of the form builder.
  2. In the pop-up, your form fields would appear in the left pane. Use the fields on the left, numbers, and mathematical operators on the right to come up with your formula.

    Add Formula
  3. Click Done.
  4. You can choose to hide this field from your respondents using the   Hide Field  option under  Properties
  5. If you wish to edit your formula, click the Edit  link under Properties.
Matrix Field in Formula
If you have Number or Currency Matrix field, you can use its values for calculation in your formula. However, you cannot reference individual cell values directly. The formula will return only the summed values of rows or columns.
Selecting a question name like R1 returns the total of all values in that row. Similarly, choosing a specific row (R1, R2, etc.) or column (C1, C2, etc.) returns the sum of values in that selection. Selecting T returns the overall total of all values in the matrix.

Supported Field Types for Formula
Number, Decimal, Currency, Slider, Rating, Formula, Radio, Checkbox, Multiple Choice, Dropdown, Image Choice, Date, Date-Time, Time, Matrix-Number, Matrix-Currency.

For example, you can calculate the amount your customer has to pay using the formula field and display the amount in the payment field automatically. For this, you can set the formula as  Item * Quantity , where the number  value assigned  for the field  Item  is taken for the calculation.

Notes
Note
While using the Formula field as a variable for calculating another formula, ensure that the two formulas are not mutually dependent. If you have come across an error because two formulas are mutually dependent, then refer to the below example:
If  n1, n2, n3 are three number fields, and f1, f2, f3 are the formulas that you have created where,

f1= n1+ n2 
f2= n3 + f3
f3= f1 + f2

Formula 2 depends on Formula 3's answer (and vice versa) to perform calculations, resulting in an endless loop. Recheck your formula to avoid this type of infinite loop.

Functions

Using the math functions we support, you can calculate the differences between time and date fields, and also round off decimal numbers into integers. You will find  Functions  in the right pane of the  Formula  field pop-up. 

To use a function,

  1. Tap on the math function you wish to add.
  2. It generates a syntax like this:  Function (Field Name - Field Name) .
  3. Replace the field's placeholders with the required form fields by clicking them from the left pane. 

    Math Functions in Formula field
Learn more about various Date, Decimal, Time, Choice and Mathematical functions.

Adding a Unit to Formula

You can add a unit to your formula to show the result more contextually in the live form. A unit can be added once the formula configuration is completed. 

To include a unit for the formula calculated value:

  1. Enter a suitable  Unit  under  Properties .

  2. You can select to position this unit either as a  Prefix  or a  Suffix


    Notes
    Note : The unit for a formula will be displayed only in Subform's Pop-up mode.

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              TypeformWCAG


                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now




                                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                Manage your brands on social media


                                                                  • Desk Community Learning Series


                                                                  • Digest


                                                                  • Functions


                                                                  • Meetups


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner


                                                                  • Word of the Day


                                                                  • Ask the Experts


                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now








                                                                                                                            • Related Articles

                                                                                                                            • Formula

                                                                                                                              How to configure a Formula field To add a formula field to your form, Click the Formula field under the Form Fields section in the left pane of the form builder. In the pop-up, your form fields would appear in the left pane. Use the fields on the ...
                                                                                                                            • Using Conditional Formula

                                                                                                                              The conditional formula set up in Zoho Forms allows you to configure your form to perform certain calculations based on your respondents' answers. These predefined conditions are simple to set up and they will tailor your form to your user's needs. ...
                                                                                                                            • How to use the Formula field and auto-populate the calculated value in the Payment field?

                                                                                                                              Money is a tricky thing. It has the potential to alter the course of any alliance, particularly one involving payments. Seller- buyer relationships can quickly become a hassle if the money flow is not error-free. And like always, Zoho Forms is here ...
                                                                                                                            • Formula Functions

                                                                                                                              Formula functions allows you to create dynamic calculations based on data entered in your form fields. These functions allow you to manipulate dates, times, decimals, selections, and numbers to perform complex logic directly within your forms. Date ...
                                                                                                                            • Field Properties

                                                                                                                              Table of Contents Overview Dynamic Field Labels Rename Uploaded Files Assign Values to Choices Import Choices Group Choices Choice Availability Scanner Input - Web Browser Scanner Input - Mobile App Overview You can set the properties to customize ...
                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources