User Guide


Form Calculation - Math Function Reference

Form Calculation - Math Function Reference

The Calculation Wizard's MATH FUNCTIONS allow you to perform mathematical tasks. The following advanced mathematical functions are available on the FORM CALCULATION WIDGET and when using the UPDATE / CALCULATE FIELD condition. You can use this as your reference to build perfect calculation forms.




abs(), acos(), asin(), atan(), atan2(), ceil(), cos(), exp(), floor(), log(), max(), min(), pow(), random(), round(), sin(), sqrt(), tan()


E, LN2, LN10, LOG2E, LOG10E, PI, SQRT1_2, SQRT2


avg(), avgNoZero(), count(), commaSeparate(), date(), dateString(), nth()

TIP: The numbers on the formula below can be replaced with the fields from your form as seen on the actual form when you test it. In other words, the numbers can either be defined on the formula or taken from the user input by adding your form fields.


1. abs()

This returns the absolute value of a number.

Example Formula:


2. acos()

Calculates the arccosine of a number.

Example Formula:


3. asin()

Calculates the arcsine of a number.

Example Formula:


4. atan()

Calculates the arctangent of a number.

Example Formula:


5. atan2()

This function calculates the arctangent of the quotient of its arguments. 

Example Formula:


6. ceil()

Round up a number to its nearest integer. If the value is a full number, it will not be rounded. 

Example Formula:


7. cos()

This returns the cosine of a number.

Example Formula:


8. exp()

This function returns the value of Ex, where E is Euler's number (approximately 2.7183) and x is the specified number.

Example Formula:


9. floor()

This is opposite of the ceil() function. This rounds down a number to its nearest integer.

Example Formula:


10. log()

Returns natural logarithm. 

Example Formula:


11. max()

Output the number with the highest value. 

Example Formula:


12. min()

Output the number with the lowest value. 

Example Formula:


13. pow()

Power returns the value of x to the power of y. Example pow(2,3) means 2*2*2, which returns 8.

Example Formula:


14. random

Returns a random number. 

Example Formula:


15. round()

Round a number to the nearest integer. 

Example Formula:


16. sin()

Return the sine of a number. 

Example Formula:


17. sqrt()

Output the square root of a number.

Example Formula:


18. tan()

Calculate the tangent. 

Example Formula:



1. E

Return the Euler's number. 

Example Formula:

E or (E*2)

2. LN2

Outputs the natural logarithm of 2, approximately 0.693 

Example Formula:

LN2 or (LN2*1)

3. LN10

Outputs the natural logarithm of 10, approximately 2.302

Example Formula:

LN10 or (LN10*1)

4. LOG2E

Base-2 logarithm of E, approximately 1.442 

Example Formula:

LOG2E or (LOG2E*1)

5. LOG10E

Base-10 logarithm of E, approximately 0.434. 

Example Formula:

LOG10E or (LOG10E*1)

6. PI

Return PI. This represents the ratio of the circumference of a circle to its diameter, approximately 3.14159

Example Formula:

PI or (PI*1)

7. SQRT1_2

Return the square root of 1/2 which is approximately 0.707

Example: (√0.5), which results to  0.707 

Example Formula:

SQRT1_2 or (SQRT1_2*1)

8. SQRT2

Return the square root of 2, approximately 1.414.

Example: (√2), which results to  1.414 

Example Formula:

SQRT2 or (SQRT2*1)


1. avg()

Returns the average value of the list of numeric values. 

Function usage: avg(value 1, value 2, value 3)

Here's an example calculation on my cloned form:

You can find the example avg() function here:

2. avgNoZero()

Calculate average value while excluding empty fields. 

Function usage: avgNoZero(value 1, value 2, value 3)

Here's an example calculation:

You can test this function on my cloned form here: Look for the avgNoZero() heading.

3. count()

Returns the number of rows that matches a specified criteria. This is usually used if you want to count the number of selections in a check box field. 

Function usage: count(multiple choice field)

Here's an example calculation:

You can test this on my cloned form here: Look for the count() function heading. 

4. commaSeparate()

Include comma separators in large numbers.

Function usage: commaSeparate(number value)

Here's an example case:

You can test this on my cloned form here: Look for the commaSeparate() function heading.

5. date()

Returns the sequential serial number that represents a particular date. You'll need to use the default date picker field if you will be using date based functions.

Function usage: date(date field value)

Here's an example case:

You can see this in action on my form here: Find the math function with header date() on it.

6. dateString()

Converts the DateTime value to a date string. 

Function usage: dateString(date field value)

Here's an example case:

You can see this in action on my cloned form here: Find the dateString() function heading.

7. nth()

The function will get the nth biggest field. 

Function usage: nth(nth biggest, value 1, value 2, value 3)

On my settings and example, the first parameter is the nth biggest rule. In my case, I set it to "1", which means I'll get the 1st biggest value in the list of inputs I will set. You can see below I have 3 input boxes, the nth() function will get the 1st biggest value. If you want to get the 2nd highest or biggest value, then set the nth rule to 2.

You can test this on my cloned form here: Look for the nth() function heading. 

Send Comment


  • telmo_gomes

    Tenho um formulário com 3 datas para as pessoas seleccionarem uma.
    gostaria de saber se é possível colocar o número de pessoas que já escolheram cada uma das datas.


  • Brother2Brother

    Hi, I am having difficulty with the form calculation for a satisfaction survey where V. Satisfied=4, Satisfied=3, Neutral=0, Dissatisfied=2 and V. Dissatisfied=1. Also, what would be the best way to display this data (i.e., pie, chart, etc) I'd like to see the number of responses for each question.
    Please help. Thanks.

  • realtomsamsher

    how can i do (fieldA+fieldB) times the number of fields added?
    so if there was three A,B,C it would be (fieldA+fieldB+fieldC)3 cause there are three fields?

  • ImaginarteLaminas

    Se pueden sumar las cantidades ingresadas en un formulario "lista configurable" gracias

  • BVHall

    I'm using the Configurable List widget to allow a user to add different booking dates for a room.
    It simply displays the date to select, then the user clicks the + button to add another date and so on.
    What I then need to do is to count the number of dates added and multiply that by another field (the cost of a room) to give a total cost.
    What I cannot figure out is how to add up the number of dates entered by the user (ie if he has entered 5 different dates then I need to use the figure 5 to calculate the total cost).
    How can I do this please?

  • sbufsaweb

    Is it possible to give an error if the calculation total is less than 6 or greater than 20?

  • Rhuan Carneiro

    how can add percentage in a certain amount that will be filled?


    Is it possible to output a fiksed value to a field, if calculation for it results in lower value? For example if a+b < 10, then output 10, if not output result for a+b

    Thank you.

  • iftach

    Is there option to make something like 0.137 round to 0.1 and 0.987 round to 0.9?

  • coachlee

    Id like to add up the values inserted in 3x fields and display it in a forth for each row of a matrix grid.

    Im basically creating a stat sheet which i can embed to my basketball club's website to allow team admin members to enter stats of their game scoresheets.

  • Hfplus

    We need to find the total number of hours and minutes between start time and end time. What would the calculation look like for this?

    We are using the i0s7 Time widget:

    Start time 9:30 AM and End time 2:30 PM total hours is: 4.00

  • acpacentertix

    I need to round up to the nearest $0.25; but the Ceiling function only allows me to round up to the nearest whole number. How can I do this?

  • Wolverin89

    cool! thanks!

  • accountax


    FieldA = 1 to unlimited(filled by user)

    FieldB = filedA but maximum to 10000

  • billwiese

    Can I calculate the days between two dates?

  • ozgurerdogan2

    What must I choose for:

    For example

    I need function for %

  • Tara Anderson

    Can you do if statements?
    If they answered ___ do field*__
    If ___*___???

  • mlps

    Is there the possibility of a math function which returns the current date and time?

  • Adrian14

    How to add interest to calculate?

  • betocaceres

    hermoso, gracias

  • cheekyface

    Can you show how to use this to generate a unique number for every submission? I want to have a quote form that gives users a reference they can use for self-quoting.

  • lawrencecfp

    If you have multiple check boxes, how do you assign a unique value to each item in the check box. For example, say you have red, blue, and yellow as check box options. How then do you assign a unique value to each color, so that when a person clicks on the color, its associated value is added to the calculation. In Excel, this would be done with an IF,THEN function.

  • jmagana

    Is there a way that on the final output or answer to the math calculation that I can have it show the dollar sign and decimal point?
    If so how do I do that?