# Formula field

Formula fields are automatically calculated fields whose value is derived from a formula or expression. They allow you to define fields that can populate dynamically calculated data based on values returned from other standard or custom fields.

A formula contains one or many of the following:

Arithmetic and Logical Operations: Perform addition, subtraction, multiplication, division, or comparing items.
Numbers
Text strings
Function Calls - Perform specific calculations on the provided data to return a result.
Field Access - Retrieve the value of a specific field. For example, created time of work item etc.,.
Conditional ("IF") Expressions - Calculate and return different results based on a specified set of criteria.

We have the following Return Data Types,
1. Number
2. String
3. Date
4. DateTime
5. Boolean

## Numeric Formula Field

A numeric function in formula fields lets you perform mathematical operations by using numeric data types.

The following table will help you understand the types of arguments required by numeric functions and the type of syntax to form.

 Function Name Description Syntax Return Type Example Abs Returns the absolute value of a number Abs(Number) Number Abs(-42) = 42Abs(23.2) = 23.2 Ceil Returns the smallest integer greater than or equal to the input. Ceil(Number) Number Ceil(3.4) = 4Ceil(-3.4) = -3 Floor Returns the largest integer less than or equal to the input. Floor(Number) Number Floor(3.4) = 3Floor(-3.4) = --4 Max Returns the maximum value from the specified list of numbers. Max(Number1, Number2, Number3, ...) Number Max(1,2,5,4) = 5Max(1,-6,5,-4) = 5 Min Returns the minimum value from the specified list of numbers. Min(Number1, Number2, Number3, ...) Number Min(3,1,5,8) = 1Min(0,-4,-3,1) = -4 Sqrt Returns the square root of a number. Sqrt(Number) Number Sqrt(9) = 3Sqrt(16) = 4 ToNumber Converts any string that consists of only numbers into a numeric variable. ToNumber(generic)Note: If an invalid number is provided it will return 0. Number ToNumber('1000') = 1000ToNumber('1.32') = 1.32 Count Returns the count of of numeric values passed as arguments. Count(generic1, generic2, generic3, ...) Number Count('1','2',String) = 2Count(1,'2','star','abc1') = 2 Average Returns the average of the values passed as arguments. Average(Number1, Number2, Number3, ...) Number Average(2,4,6) = 4Average(2,5,7,9) = 5.75 Mod Returns the remainder of a number after division. Mod(dividend[Number], divisor[Number]) Number Mod(10,3) = 1Mod(12,3) = 0 Round Returns a number rounded to given number of digits. Round(Number, noOfDigits[Number]) Number Round(10.968,2) = 10.97 Sum Returns the sum of the values passed as arguments. Sum(Number1, Number2, Number3, ...) Number Sum(1,5,6) = 12

To create a numeric formula field,
1. Drag and drop the Formula custom field
2. Enter the name of your field.
3. Choose a return type.
4. Choose Numeric in the All Functions drop-down.
5. You can either enter your own formula expression or create your expression using the provided fields.
6. Choose the privacy preferences and click Create .

## String Formula Field

A string is an array of characters and can contain space, numbers, symbols or values within quotes to differentiate it from a number or a name.

The following table will help you understand the types of arguments required by string functions and the type of syntax to form.

 Function Name Description Syntax Return  Type Example Strlen Returns the length of the string. Strlen(String) Number Strlen('test') = 4 Find Returns the search letter's position within the string. Find(String, searchString[String], startPosition[Number]**) Note:startPosition - startsWith 1. Number Find('greenery','n',1) = 5Find('greenery','e',5) = 6 Concat Returns the concatenation of all the string params. Concat(String1, String2, ...) String Concat('Zoho',' ','Sprints') =     'Zoho Sprints' Contains Returns 'true' if and only if this string contains the search string. Otherwise returns 'false'. Contains(String, searchString[String]) Boolean Contains('abcdef','cd') = trueContains('abcdef','jk') = false Startswith Returns 'true' if the string begins with the search string, otherwise it returns 'false'. Startswith(String, searchString[String]) Boolean Startswith('abcdef','ab') = trueStartswith('abcdef','jk') = false Endswith Returns 'true' if the string ends with the search string, otherwise it returns 'false'. Endswith(String, searchString[String]) Boolean Endswith('abcdef','ab') = trueEndswith('abcdef','jk') = false Tolower Converts all letters in the input string to lowercase. Tolower(String) String Tolower('APPLE') = 'apple'Tolower('Apple') = 'apple' Toupper Converts all letters in the input string to uppercase. Toupper(String) String Toupper('Apple') = 'APPLE'Toupper('apple') = 'APPLE' Trim Removes the leading and trailing spaces from the input string. Trim(String) String Trim(' abcd ') = 'abcd'Trim(' ab cd ') = 'ab cd' SubString Returns a substring of the input string, from the specified beginIndex and endIndex. SubString(String, beginIndex[Number], endIndex[Number]**) Note:beginIndex - startsWith 1. String SubString('abcdefg',4,7) = 'defg' Replace Replaces each occurrence of the search string in the input string with the replacement string. Replace(String, SearchString[String], replacementString[String]) String Replace( 'abcdefg' , 'abc' , 'xyz' ) = 'xyzdefg'Replace( 'abcdefg' , 'def' , 'xyz' ) = 'abcxyzg' Strsplit Split the string based on the given separator and return nth (returnIndex) portion of the string. Strsplit(String, returnIndex[Number], separatorToSplit[character]**)Note: separatorToSplit = ' ' is defaultValuereturnIndex - startsWith 1. Strsplit Strsplit('abc def ghi',2,' ') = 'def' ToString Converts any argument into string. ToString(generic) String ToString(1.2) = '1.2'ToString(true) = 'true'

To create a string formula field,
1. Drag and drop the Formula custom field
2. Enter the name of your field.
3. Choose a return type.
4. Choose String in the All Functions drop-down.
5. You can either enter your own formula expression or create your expression using the provided fields.
6. Choose the privacy preferences and click Create.

## DateTime Formula Field

DateTime functions can be used in formula fields to retrieve the  date and time information in a specific format.

The following table will help you understand the types of arguments required by numeric functions and the type of syntax to form.

To create a DateTime formula field,
1. Drag and drop the Formula custom field.
2. Enter the name of your field.
3. Choose a return type.
4. Choose Date Time in the All Functions drop-down.
5. You can either enter your own formula expression or create your expression using the provided fields.
6. Choose the privacy preferences and click Create .

## Boolean Formula Field

A boolean function calculates the result based on the logical manipulation of the input. It determines the entities with just two values, true or false, along with and, or, and not.

The following table will help you understand the types of arguments required by boolean functions and the type of syntax to form.

 Function Name Description Syntax Return Type Example If Returns one of the two values, depending on a logical condition. If(boolean, generic1, generic2) Generic If(5>7,1,0) = 0If(8>7,'true','false') = 'true' And Returns 'true' if all expressions are true. Otherwise returns 'false'. And(boolean1,boolean2, ...) Boolean And(5>6,4==4,6>7) = falseAnd(5<6,4==4,8>7) = True Or Returns 'true' if any one of the expressions is true. Otherwise returns 'false'. Or(boolean1,boolean2, ...) Boolean Or(5<6,4==4,6>7) = TrueOr(2>6,4==3,3>7) = false Not Returns the logical negative of the given expression. Not(boolean) Boolean Not(true) = falseNot(false) = true

To create a boolean formula field,
1. Drag and drop the Formula custom field
2. Enter the name of your field.
3. Choose a return type.
4. Choose Boolean in the All Functions drop-down.
5. You can either enter your own formula expression or create your expression using the provided fields.
6. Choose the privacy preferences and click Create.
Note:
1. Return Type of a formula field cannot be edited after creating it.
2. A maximum of 10 fields can be used in a formula field.
3. A maximum of 5 nested functions can be used in a field.
4. Formula fields cannot be set mandatory.
5. If the empty field is numeric, it will be considered as 0, if it is string itâ€™ll be considered as "".

### Zoho CRM Training Programs

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

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.

Create, share, and deliver

beautiful slides from anywhere.

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

 Quick Links Workflow Automation Data Collection Web Forms Enterprise Begin Data Collection Interactive Forms Workplace Data Collection App Offline Forms Customer Service Accessible Forms Digital Forms Marketing Forms for Small Business HTML Forms Education Forms for Enterprise Contact Forms E-commerce Lead Generation Forms Healthcare Wordpress Forms Customer onboarding No Code Forms Construction Free Forms Travel Prefill Forms Non-Profit Intake Forms Legal Form Designer HR Card Forms Assign Forms Translate Forms Electronic Forms Notification Emails for Forms Holiday Forms Form to PDF HIPAA Forms

Zoho Pagesense Resources

New to Zoho Survey?

Manage your brands on social media

Zoho Desk Resources

• Desk Community Learning Series

• Digest

• Functions

• Meetups

• Kbase

• Resources

• Glossary

• Desk Marketplace

• MVP Corner

• Word of the Day

# Zoho Sheet Resources

New to Zoho Forms?

# Zoho Forms Resources

communication with Zoho Mail

Mail on the move with
Zoho Mail mobile application

Stay on top of your schedule
at all times

Anytime, anywhere

# Zoho Sign Resources

Sign, Paperless!

Sign and send business documents on the go!

Zoho SalesIQ Resources

# Zoho DataPrep Resources

Zoho DataPrep Demo

Get a personalized demo or POC

Design. Discuss. Deliver.

Create visually engaging stories with Zoho Show.

• # Related Articles

• ## Zoho Sprints HIPAA Compliance Guide

The Health Insurance Portability and Accountability Act (including the Privacy Rule, Security Rule, Breach notification Rule, and Health Information Technology for Economic and Clinical Health Act) ("HIPAA"), requires Covered Entities and Business ...
• ## Zoho Sprints GDPR Compliance

Data privacy and security are the core elements that every business should guarantee its customers with. Keeping this in mind, the European Union's General Data Protection Regulation (GDPR) came into discussion. It enforces all the businesses across ...
• ## Create and manage custom fields

Custom fields are the important aspect in shaping a layout. A layout is structured with a list of fields that are specific to your requirements. Once the user creates a layout they can start adding custom fields. You can create custom fields for ...
• ## Export sprints

You can export the sprint data in an xls or csv file and download it to use outside of the application. This can be used to transform data from Zoho Sprints into a file that you can process in third party apps or other in-house devices. Benefits ...
• ## Custom domain

A domain is the text that you key into the address bar when you're trying to locate a source on the web. If you want to locate Zoho's website you will enter https://www.zoho.com on the browser. Like all other Zoho applications, Zoho Sprints is hosted ...
Wherever you are is as good as

# 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.