The following advanced mathematical functions are available in the Form Calculation Widget and when using the Update/Calculate Field Conditional Logic.


You can use this guide as your reference to build perfect calculation forms.
Math Functions
The arguments can either be fixed or variable from the form fields.

Function | Description |
---|---|
abs() |
Returns the absolute (positive) value of a number.
abs(-100) = 100 |
acos() |
Returns the arc cosine of a number.
acos(0.5) = 1.05 |
asin() |
Returns the arc sine of a number.
asin(0.5) = 0.52 |
atan() |
Returns the arc tangent of a number in radians.
atan(1) = 0.7854 |
atan2() |
Returns the arc tangent of two variables x and y.
atan2(4, 8) = 0.4636 |
ceil() |
Rounds a number up to the nearest integer.
ceil(1.3) = 2 |
cos() |
Returns the cosine of a number.
cos(2) = -0.42 |
exp() |
Returns e raised to the power of a given number.
exp(1) = 2.7183 |
floor() |
Rounds a number down to the nearest integer.
floor(1.7) = 1 |
log() |
Returns the natural logarithm of a number.
log(2) = 0.69 |
max() |
Returns the highest value.
max(4, 8, 2) = 8 |
min() |
Returns the lowest value.
min(1, 2, 5) = 1 |
pow() |
Returns x raised to the power of y.
pow(2, 3) = 8 |
random() |
Generates a random float between 0 and 1.
random() * 100 = a random number between 0 and 100 |
round() |
Rounds a number to the nearest integer.
round(2.5) = 3 |
sin() |
Returns the sine of a number.
sin(3) = 0.14 |
sqrt() |
Returns the square root of a number.
sqrt(25) = 5 |
tan() |
Returns the tangent of a number.
tan(45) = 1.62 |
E |
Return the Euler’s number.
E * 1 = 2.7183 |
LN2 |
Returns the natural logarithm of 2.
LN2 * 1 = 0.6931 |
LN10 |
Returns the natural logarithm of 10.
LN10 * 1 = 2.3026 |
LOG2E |
Returns the base-2 logarithm of E.
LOG2E * 1 = 1.4427 |
LOG10E |
Returns the base-10 logarithm of E.
LOG10E * 1 = 0.4343 |
PI |
Returns the value of PI.
PI * 1 = 3.1416 |
SQRT1_2 |
Return the square root of 1/2.
SQRT1_2 * 1 = 0.7071 |
SQRT2 |
Return the square root of 2.
SQRT2 * 1 = 1.4142 |
avg() |
Returns the average of supplied numbers.
avg(0, 2, 4) = 2 |
avgNoZero() |
Returns the average of supplied numbers while excluding zeroes and empty fields.
avgNoZero(0, 2, 4) = 3 |
count() | Returns the number of selected options in a Multiple Choice or Single Choice element. |
commaSeparate() |
Include comma separators in large numbers.
commaSeparate(1234567) = 1,234,567.00 |
dateString() |
Converts a Date Picker’s value (or epoch time in days) to a date string in “D M d Y” format.
dateString(12-25-2030) = Wed Dec 25 2030 |
nth() |
Returns the nth largest number.
nth(2, 20, 30, 40) = 30 |
minutes() |
Converts minutes to milliseconds.
minutes(1) = 60000 |
hours() |
Converts hours to milliseconds.
hours(1) = 3600000 |
days() |
Converts days to milliseconds.
days(1) = 86400000 |
weeks() |
Converts weeks to milliseconds.
weeks(1) = 604800000 |
months() |
Converts months to milliseconds.
months(1) = 2592000000 |
Send Comment:
13 Comments:
Survey with 40 single choice questions, possibility of 4 different alpha values (E, A, I, S)...how do I tally the results?
Honestly, why is there not a function for: SUM(A-Z)?
How do i calculate the answers in my quiz form to know the total correct answer?
Which function should i use in adding the value in the calculation widget?
Is there a way to round to 2 decimals instead of to the integer?
Description of the "date" function that returns the sequential number that represents a particular date is not listed. It should be between "commaSeparate()" and "dateString()".
how to calculate survey responses, scale of 1-5
How do i calculate the difference between to times. For instance, how much time passed from 8:30AM to 3:30 PM?
How I can calculate total number of jpg files upload in form and the number that still remains to add 100 files. I want to make a form for printing photos up to 100 files.
How can I calculate the number of hours worked based on time
Hi, I have this big equation that I am trying to put on jotform calculations and it doesn't seem to work. Would you be help out?
In the places of F4, E4 and D4 i would number fields to fill in.
=495/(1.0324-0.19077*log10(F4-E4)+0.15456*log10(D4))-450
min function not working even on the template provided above.
Is it possible to lock this widget so that a form user cannot mess with the formula calculations being done? I can ask them to not reconfigure the math completed in this field, but it would just be easier if they just didn't have the opportunity to do so.
Thanks!
How can I calculate a duration (difference of two different hours)? Thank you.