Supported Functions

Browse through the list of built-in supported functions.

Math Functions

ABS

This function returns the absolute value of the provided numeric value.

= ABS(-12.5)

ATAN

This function returns the arctangent of the provided numeric value.

= ATAN(45, 45)

AVERAGE

This function returns the average of the provided list of numeric values.

= AVERAGE(A2:A5)

CEILING

This function returns the smallest integer greater than or equal to the provided numeric value.

= CEILING(6.2)

CHOICE

This function returns a random value from the provided list of values.

= CHOICE(10, 20, 30)

COS

This function returns the cosine of the provided numeric value.

= COS(45)

EXP

This function returns the result of raising e to the power of the provided numeric value.

= EXP(12)

FLOOR

This function returns the largest integer less than or equal to the provided numeric value.

= FLOOR(10.8)

HYPOT

This function returns the hypotenuse of the provided numeric values.

= HYPOT(45, 45)

LOG

This function returns the natural logarithm of the provided numeric value.

= LOG(15)

MAX

This function returns the maximum value from the provided list of numeric values.

= MAX(A2:A5)

MIN

This function returns the minimum value from the provided list of numeric values.

= MIN(A2:A5)

NORM

This function returns a random number from a normal distribution with a mean of 0 and a standard deviation of 1.

= NORM()

PI

This function returns the value of pi.

= PI()

POWER

This function returns the result of raising the first argument to the power of the second argument.

= POWER(2, 3)

PRODUCT

This function returns the product of the provided list of numeric values.

= PRODUCT(A2:A5)

RADIANS

This function converts the provided angle in degrees to radians.

= RADIANS(180)

RAND

This function returns a random floating point number between 0 and 1.

= RAND()

RANDBETWEEN

This function returns a random integer between the two provided values. The first argument is the minimum value and the second argument is the maximum value.

= RANDBETWEEN(5, 12)

ROUND

This function returns the provided numeric value rounded to the specified number of decimal places.

= ROUND(10.583, 2)

SIGN

This function returns the sign of the provided numeric value. Returns 1 if the value is positive, -1 if the value is negative, and 0 if the value is zero.

= SIGN(10)

SIN

This function returns the sine of the provided numeric value.

= SIN(45)

SQRT

This function returns the square root of the provided numeric value.

= SQRT(9)

STDDEV

This function returns the standard deviation of the provided list of numeric values.

= STDDEV(A2:A5)

SUM

This function returns the sum of the provided list of numeric values.

= SUM(A2:A5)

TAN

This function returns the tangent of the provided numeric value.

= TAN(45)

Logical Functions

AND

This function returns true if all of the provided arguments are true. Otherwise, it returns false.

= AND(10 > 20, TRUE)

IF

This function returns one of two values based on the provided condition. If the condition is true, the first argument is returned. Otherwise, the second argument is returned.

= IF(10 > 20, "Yes", "No")

OR

This function returns true if at least one of the provided arguments is true. Otherwise, it returns false.

= OR(10 > 20, FALSE)

Range Functions

COUNT

This function returns the number of numeric values in the provided list.

= COUNT(A2:A5)

COUNTIF

This function returns the number of values in the provided list that meet the provided condition.

= COUNTIF(A2:A5, TRUE)

INDEX

This function returns the value at the provided index in the provided list.

= INDEX(A2:A5, 2)

MATCH

This function returns the index of the provided value in the provided list. If the value is not found, it returns -1.

= MATCH("ID", A2:A5)

Text Functions

CONCAT

This function returns a concatenated string of the provided list of values.

= CONCAT("Hello", "World", "!")

LEFT

This function returns the left part of the provided string. The first argument is the string and the second argument is the number of characters to return.

= LEFT("Hello", 5)

LEN

This function returns the length of the provided string.

= LEN("Hello")

MID

This function returns the middle part of the provided string. The first argument is the string, the second argument is the starting index, and the third argument is the number of characters to return.

= MID("Hello", 1, 5)

RIGHT

This function returns the right part of the provided string. The first argument is the string and the second argument is the number of characters to return.

= RIGHT("Hello", 5)

Special Functions

DATASET

This function retrieves a dataset by key.

= DATASET("bitcoin")

KEYHOLD

This function is used for user interaction using the keyboard while the simulation is running. Returns true if the provided key is pressed. This function returns true until the key is released.

= KEYHOLD("A")

KEYPRESS

This function is used for user interaction using the keyboard while the simulation is running. Returns true if the provided key is pressed. This function returns true only in the step it was pressed in and its subsequent press required to release it first.

= KEYPRESS("A")

Simulation Functions

STEP

This function returns the current step of the simulation.

= STEP()

Graph Functions

AXES

This function returns an axes. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= AXES("x", "y")

BAR

This function returns a bar. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= BAR(10, 20, 30)

BUBBLE

This function returns a bubble chart. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= BUBBLE(10, 20, 30)

CATEGORICAL

This function returns a categorical scale. The first argument is the minimum value and the second argument is the maximum value.

= CATEGORICAL(10, 20)

COLUMN

This function returns a column. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= COLUMN(10, 20, 30)

CONTINUOUS

This function returns a continuous scale. The first argument is the minimum value and the second argument is the maximum value.

= CONTINUOUS(10, 20)

COORD

This function returns a categorical coord. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= COORD("x", 10)

FILLCOLOR

This function returns a fill color. The first argument is the color name.

= FILLCOLOR("red")

FONT

This function returns a font. The first argument is the font name.

= FONT("Arial")

GRAPH

This function returns a graph. The first argument is the value to render.

= GRAPH(A2)

LINE

This function returns a line. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= LINE(10, 20, 30)

NEST

This function returns a nest. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= NEST(10, 20, 30)

NESTX

This function returns a nest x. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= NESTX(10, 20, 30)

NESTY

This function returns a nest y. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= NESTY(10, 20, 30)

OVERLAY

This function returns an overlay. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= OVERLAY(10, 20, 30)

PADDING

This function returns a padding. The first argument is the top padding, the second argument is the right padding, the third argument is the bottom padding, and the fourth argument is the left padding.

= PADDING(10, 20, 30, 40)

POINT

This function returns a point. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= POINT(10, 20)

SCALE

This function returns a scale. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= SCALE(10, 20, 30)

SCALEX

This function returns a scale x. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= SCALEX(10, 20, 30)

SCALEY

This function returns a scale y. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= SCALEY(10, 20, 30)

SHAPE

This function returns a shape. The first argument is the x value, the second argument is the y value, and the third argument is the size value.

= SHAPE(10, 20, 30)

STROKECOLOR

This function returns a stroke color. The first argument is the color name.

= STROKECOLOR("red")

TEXT

This function returns the provided value as a text string.

= TEXT("Hello")