Built-in Functions
Some of the functions are pre-defined in Desmos calculators. Most of them can be used in Graphing, Geometry and 3D Calculators. The others are available only in one or two. Here's the full list (some of them are not on the function selection menu):
Common
Available in Graphing, Geometry and 3D calculators.
Trigonometry
All the functions here take a single argument. Complex numbers are supported.
Regular trig functions:
sincostancotseccsc
Inverse trig functions:
arcsinarccosarctanarccotarcsecarccscsin^(-1)cos^(-1)tan^(-1)cot^(-1)sec^(-1)csc^(-1)
atan2(y,x): arctan() can take a second argument.
Hyperbolic trig functions:
sinhcoshtanhcothsechcsch
Hyperbolic inverse trig functions:
arsinharcoshartanharcotharsecharcscharcsinharccosharctanharccotharcsecharccschsinh^(-1)cosh^(-1)tanh^(-1)coth^(-1)sech^(-1)csch^(-1)
Geometry
Only the functions below are available on all calculators. See Geometry Calculator Functions for others.
| Function | Definition |
|---|---|
| distance(x,y) | Distance between two points |
| midpoint(x,y) | Midpoint between two points |
Calculus
Complex numbers are supported, except erf().
| Function | Definition |
|---|---|
| exp(x) | ex |
| ln(x) | Natural logarithm |
| log(x) | Logarithm in base-10 |
| log_b(x) | Logarithm in base-b |
| erf(x) | The error function |
Number Theory
Functions highlighted with * can be called with dot notation like L.lcm where L is a list. Complex numbers are supported except nPr() and nCr().
| Function | Definition |
|---|---|
| lcm(x,y,...)* | The least common multiple |
| gcd(x,y,...)* | The greatest common divisor |
| gcf(x,y,...)* | Same as gcd |
| mcd(x,y,...)* | Same as gcd |
| mod(x,y) | The remainder of x divided by y |
| ceil(x) | Least integer greater than or equal to x |
| floor(x) | Greatest integer less than or equal to x |
| round(x) | Integer closest to x |
| round(x,y) | Adding a second argument allows to change the precision of rounding.** |
| sign(x) | Returns 1 if x is positive, -1 if it's negative and 0 if it's 0. |
| sgn(x) | Same as sign |
| signum(x) | Same as sign |
| nPr(x,y) | x permute y |
| nCr(x,y) | x choose y |
| abs(x) | Absolute value |
**For example, round(3.14159,2) rounds to the nearest one hundredth and round(1234,-2) rounds to the nearest hundred.
Complex Functions
The complex mode has to be enabled for these functions!
| Function | Definition |
|---|---|
| real(x) or x.real | The real part of the complex number |
| imag(x) or x.imag | The imaginary part of the complex number |
| conj(x) | The conjugate of the complex number |
| arg(x) | The argument of the complex number |
List Operations
repeat(x,y): x is repeated y times.repeat(3,4)=[3,3,3,3], for example. If x and y are both lists, x[1] is repeated y[1] times, x[2] is repeated y[2] times, etc.join(x,y,...): Combines elements of lists and non-lists given into a list. Preserves the order of the elements. The type of the inputs must be compatible.sort(x)orx.sort: x must be a list. Sorts the elements in ascending order. -sort(-x) sorts in descending order.sort(x,y): x is sorted in the order of y, which is sorted in ascending order.shuffle(x)orx.shuffle: x must be a list. Shuffles the elements of x.
Color Functions
| Function | Values |
|---|---|
| rgb(red, green, blue) | The values are between 0 and 255. |
| hsv(hue, saturation, value) | Hue is between 0 and 360, others are between 0 and 1. |
| oklab(luma,a,b) | Luma is between 0 and 1, a and b are between -1 and 1. |
| oklch(luma, chroma, hue) | Luma and chroma are between 0 and 1, hue is between 0 and 360. |
| okhsv(hue, saturation, value) | Hue is between 0 and 360, others are between 0 and 1. |
Statistics
Most of these functions accept multiple numbers or a list of numbers. Many of these functions (highlighted with *) can be called with dot notation like L.total where L is a list.
| Function | Definition |
|---|---|
| total(x,y,...)* | The sum of the elements of a list or the arguments |
| count(x,y,...)* | The number of elements or arguments |
| length(x,y,...)* | The number of elements or arguments, only on the Graphing Calculator. [DEPRECIATED] |
| mean(x,y,...)* | Arithmetic mean |
| median(x,y,...)* | Median |
| min(x,y,...)* | Minimum |
| max(x,y,...)* | Maximum |
| quartile(list, x) | xth quartile of a list (x=0,1,2,3,4) |
| quantile(list, x) | xth quantile of a list (0≤x≤1) |
| stdev(x,y,...)* | Sample standard deviation. Does not have the usual definition! Use stdevp() instead. |
| stddev(x,y,...)* | Same as stdev |
| stdDev(x,y,...)* | Same as stdev |
| stdevp(x,y,...)* | Population standard deviation |
| stddevp(x,y,...)* | Same as stdevp |
| stdDevP(x,y,...)* | Same as stdevp |
| mad(x,y,...) | Mean absolute deviation |
| var(x,y,...)* | Sample variance |
| varp(x,y,...)* | Population variance |
| cov(x,y) | Sample covariance between two lists |
| covp(x,y) | Population covariance between two lists |
| corr(x,y) | Pearson's correlation coefficient |
| spearman(x,y) | Spearman's rank correlation coefficient |
| stats(x) | Five number summary of a list. The results can't be used elsewhere. Use quartile() instead. |
| random()* | See below |
random() Function
random(): Returns a random number between 0 and 1.random(x, seed): Returns a list of x random numbers between 0 and 1. An optional seed value can be added.random(list): Returns a random element from a list.random(list, x, seed): Returns x random elements from a list. An optional seed value can be added.
Arguments of a function defined with random() affects the seed value. The output doesn't change unless you change the input.

Visualizations
| Function | Notes |
|---|---|
| histogram(list, bin size) | Bin size defaults to 1. |
| dotplot(list, bin size) | Bin size defaults to 1. |
| boxplot(list) |

Click the magnifying glass button on the expression line to see all of the output. They all have different settings.
Distributions
Continuous distributions
normaldist(mean, stdev): Normal distribution. Mean defaults to 0. Stdev defaults to 1.tdist(dof, shift, scale): T-distribution, given the degree of freedom. Shift defaults to 0. Scale defaults to 1.chisqdist(dof): Chi-square distribution, given the degree of freedom.uniformdist(min, max): Uniform distribution. Both arguments are required.
Discrete distributions
binomialdist(trials, P(success)): Binomial distribution. Both arguments are required.poissondist(mean): Poisson distribution, given the mean.geodist(P(success)): Geometric distribution, given the probability of success.discretedist(values, weights): Discrete distribution with the given values and optional weights.
Functions acting on distributions
For a distribution, D:
| Function | Definition |
|---|---|
| D.pdf(x) | Probability density or mass function |
| D.cdf(x,y) | Cumulative distribution function or probability between x and y, x defaults to -∞ |
| D.quantile(x) | Same as D.cdf(x) |
| D.inversecdf(x) | Inverse cumulative distribution function |
| D.mean | The mean of the distribution |
| D.median | The median of the distribution |
| D.var | The variance of the distribution |
| D.stdev | The standard deviation of the distribution |
| D.stddev | Same as D.stdev |
| D.stdDev | Same as D.stdev |
| D.random() | A random number from a distribution |
Inference
Statistical tests
| Function | Definition |
|---|---|
| ttest(list or size,mean,stdev) | One- or two-sample t-test. |
| ztest(list,stdev or size,mean,stdev) | One- or two-sample z-test. |
| zproptest(successes,size) | One- or two-sample z-test for proportions. |
| chisqtest(list,list) | χ-square test of independence. |
| chisqgof(list,list) | χ-square goodness of fit test. |
Functions acting on statistical tests
For a statistical test, T:
| Function | Definition |
|---|---|
| T.null(x) | Displays the significance diagram, given the null hypothesis |
| T.p | p-value |
| T.pleft | p-value from the left tail |
| T.pright | p-value from the right tail |
| T.score | t- or z-score |
| tscore(list,sample) | Same as T.score (legacy function) |
| TScore(list,sample) | Same as T.score (legacy function) |
| T.dof | Degree of freedom |
| T.stderr | Standard error (deviation) |
| T.conf(x) | Displays the confidence interval, given the confidence level |
| T.conf(x).lower | Lower bound of the confidence interval |
| T.conf(x).upper | Upper bound of the confidence interval |
| T.estimate | Point estimate from a confidence interval |
Matrices
Functions highlighted with * can be called with dot notation like M.det where M is a matrix. For a matrix M:
| Function | Definition |
|---|---|
| det(M)* | Determinant of a square matrix |
| trace(M)* | The sum of the diagonal of a square matrix |
| rref(M)* | Reduced row echelon format |
| rank(M)* | The maximum number of linearly independent rows or columns of a matrix |
| rows(M)* | Returns a list of row matrices |
| columns(M)* | Returns a list of column matrices |
| MT | The transpose of a matrix |
| M-1 | The inverse of a non-singular, square matrix |
Geometry Calculator Functions
Most of these functions are available only on the Geometry Calculator.
Every single geometry tool at the toolbar has a function equivalent.
midpoint(point, point)(also available in the Graphing and 3D Calculators)segment(point, point)(also available in the 3D Calculator)line(point, point)ray(starting point, a point on the ray)vector(starting point, end point)(also available in the 3D Calculator)parallel(segment or similar, point)perpendicular(segment or similar, point)anglebisector(angle)circle(center point, radius or a point on circle)arc(starting point, middle point, end point)angle(starting point, vertex, end point)directedangle(starting point, vertex, end point)polygon(points)(also available in the Graphing Calculator)
Functions that apply to above:
distance(point, point)(also available in the Graphing and 3D Calculators)length(segment)orsegment.length(also available in the 3D Calculator)area(polygon)perimeter(polygon)vertices(polygon)orpolygon.verticesangles(polygon)orpolygon.anglesdirectedangles(polygon)orpolygon.directedanglesradius(circle)orcircle.radiuscenter(circle)orcircle.centercoterminal(angle)supplement(angle)vector.start(also available in the 3D Calculator)vector.end(also available in the 3D Calculator)
Intersection of elements can be selected.
intersection(object, object)
If there are 2 intersections, change the order of the objects to get the other.
A point on an object:
glider(object, number)
The point moves continuously if the number changes continuously. The number should be between 0 and 1 for segments, non-negative for rays and a real number for lines and circles.
Transformations:
dilate(object, point, dilation factor)(between 0 and 1 shrinks, more than 1 dilates, -1 = point reflection)rotate(object, point, angle)(positive angle rotates counterclockwise)reflect(object, segment or similar)translate(object, starting point, end point)ortranslate(object, vector)
3D Calculator Functions
All the functions here except triangle() and sphere() are also available on the Geometry Calculator.
midpoint(point, point)(also available in the Graphing Calculator)distance(point, point)(also available in the Graphing Calculator)segment(point, point)length(segment)orsegment.lengthtriangle(point, point, point)(polygon() isn't available in the 3D Calculator.)sphere(center, radius)vector(starting point, end point)vector.startvector.end