Perform Calculations | Formula Field - Zoho Forms

Formula

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  

Setup

To add a formula field to your form,

  1. Click the Formula field under the Number section.
  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.
    Formula field setup
  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 .
Supported Field Types for Formula
Number, Decimal, Currency, Slider, Rating, Formula, Radio, Checkbox, Multiple Choice, Dropdown, Image Choice, Date, Date-Time, Time.

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. 
    Using functions in Formula field

Supported Math Functions


Function
Role
Supported Field Types
DayDiff
Returns the day difference between two date values
Date, Date-Time
MonthDiff
Returns the month difference between two date values
Date, Date-Time
YearDiff
Returns the year difference between two date values
Date, Date-Time
HourDiff
Returns the hour difference between two time values
Time, Date-Time
MinutesDiff
Returns the minute difference between two time values
Time, Date-Time
RoundUp
Rounds off the decimal number to that next value, away from zero
Decimal, Currency, Formula
RoundDown
Rounds off the decimal number to that of the previous value
Decimal, Currency, Formula
Round
Rounds off a decimal number to that of the next number when the decimal
value is .5 or above, and to the previous number when the decimal value is below .5
Decimal, Currency, Formula
Learn more about other functions and their usage. 

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 .

    Unit
  2. You can select to position this unit either as a Prefix or a Suffix.
    Prefix and 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

                                  Zoho FSM Video Tutorials


                                        All-in-one knowledge management and training platform for your employees and customers.

                                                  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

                                                                                                                                    • 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, ...
                                                                                                                                    • 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. ...
                                                                                                                                    • 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 ...
                                                                                                                                    • 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 ...
                                                                                                                                    • Auto-populate Formula field value in Payments field

                                                                                                                                      Watch a quick video on how you can assign values to a choice based field and use the assigned values in Formula field calculations and use the calculated value to be auto-populated in the Payments field. Help Guide: Setup an auto-populating value in ...
                                                                                                                                      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