Skip to main content

Supported Functions

Graphing Calculator​

Trigonometry​

FunctionInputMeaning
sin\mathrm{sin}sin(x)Sine
cos\mathrm{cos}cos(x)Cosine
tan\mathrm{tan}tan(x)Tangent
csc\mathrm{csc}csc(x)Cosecant (1/sin⁡x)(1/\sin x)
sec\mathrm{sec}sec(x)Secant (1/cos⁡x)(1/\cos x)
cot\mathrm{cot}cot(x)Cotangent (1/tan⁡x)(1/\tan x)

Inverse trigonometry​

FunctionInputMeaning
arcsin\mathrm{arcsin}arcsin(x)Inverse sine
arccos\mathrm{arccos}arccos(x)Inverse cosine
arctan\mathrm{arctan}arctan(x)Inverse tangent
arccsc\mathrm{arccsc}arccsc(x)Inverse cosecant
arcsec\mathrm{arcsec}arcsec(x)Inverse secant
arccot\mathrm{arccot}arccot(x)Inverse cotangent

Statistics​

FunctionInputMeaning
mean\mathrm{mean}mean([1,3,4])Mean
median\mathrm{median}median([1,3,4])Median
min/max\mathrm{min}/\mathrm{max}min([1,3,4])Minimum / maximum
quartile\mathrm{quartile}quartile([1,3,4],2)Quartile
quantile\mathrm{quantile}quantile([1,3,4],0.2)Quantile
stdev/stdevp\mathrm{stdev}/\mathrm{stdevp}stdev([1,3,4])Sample / population standard deviation
var/varp\mathrm{var}/\mathrm{varp}var([1,3,4])Sample / population variance
mad\mathrm{mad}mad([1,3,4])Mean absolute deviation
cov/covp\mathrm{cov}/\mathrm{covp}cov([2,4,5],[1,3,2])Sample / population covariance
corr\mathrm{corr}corr([2,4,5],[1,3,2])Pearson correlation coefficient
spearman\mathrm{spearman}spearman([2,4,5],[1,3,2])Spearman rank correlation
stats\mathrm{stats}stats([1,3,3,4,5])Five-number summary
count\mathrm{count}count([1,3,3,4,5])Number of elements
total\mathrm{total}total([1,3,4])Sum of elements

List operations​

FunctionInputMeaning
join\mathrm{join}join([1,2],[3,4])Join lists
sort\mathrm{sort}sort([1,5,4])Sort a list
shuffle\mathrm{shuffle}shuffle([1,5,4])Shuffle a list
unique\mathrm{unique}unique([1,5,5,6])Remove duplicate values
for\mathrm{for}(a,0) for 1<a<3Parameters and list iteration

Visualizations​

FunctionInputMeaning
histogram\mathrm{histogram}histogram([1,5,5,10])Histogram; optional width as second argument
dotplot\mathrm{dotplot}dotplot([1,5,5,10])Dot plot; optional width as second argument
boxplot\mathrm{boxplot}boxplot([1,5,5,10])Box plot

Probability distributions​

FunctionInputMeaning
normaldist\mathrm{normaldist}normaldist(0,1)Normal distribution
tdist\mathrm{tdist}tdist(10)Student’s t distribution
chisqdist\mathrm{chisqdist}chisqdist(5)Chi-square distribution
poissondist\mathrm{poissondist}poissondist(5.5)Poisson distribution
binomialdist\mathrm{binomialdist}binomialdist(10,0.3)Binomial distribution
uniformdist\mathrm{uniformdist}uniformdist(0,1)Uniform distribution
pdf\mathrm{pdf}pdf(D,x)Probability density function
cdf\mathrm{cdf}cdf(D,x)Cumulative distribution function
inversecdf\mathrm{inversecdf}inversecdf(D,x)Quantile / inverse CDF
random\mathrm{random}random()Random number in [0,1)[0,1), or random list element

Statistical tests​

FunctionInputMeaning
ttest\mathrm{ttest}ttest([20,31,51],40)One-sample t test
tscore\mathrm{tscore}tscore([20,31,51],40)t score
ittest\mathrm{ittest}ittest([10,13],[21,23])Two-sample t test

Calculus​

Function or symbolInputMeaning
exp⁡\expexp(x)Exponential function with base ee
ln⁡\lnln(x)Natural logarithm
log⁡\loglog(x)Common logarithm
log⁡a\log_alog_a(x)Logarithm with any base
ddx\frac{d}{dx}d/dxDifferentiate with respect to xx
f′(x)f'(x)f'(x)Derivative
∫\intintIntegral
∑\sumsumSum of a sequence
∏\prodprodProduct of a sequence

Hyperbolic functions​

FunctionInputMeaning
sinh\mathrm{sinh}sinh(x)Hyperbolic sine
cosh\mathrm{cosh}cosh(x)Hyperbolic cosine
tanh\mathrm{tanh}tanh(x)Hyperbolic tangent
csch\mathrm{csch}csch(x)Hyperbolic cosecant
sech\mathrm{sech}sech(x)Hyperbolic secant
coth\mathrm{coth}coth(x)Hyperbolic cotangent

Color and sound​

FunctionInputMeaning
rgb\mathrm{rgb}c=rgb(255,165,0)Create a color from red, green, and blue values
hsv\mathrm{hsv}c=hsv(25,0.8,1)Create a color from hue, saturation, and value
tone\mathrm{tone}tone(440)Play a frequency; optional gain as second argument

Number theory and rounding​

FunctionInputMeaning
lcm\mathrm{lcm}lcm(2,3,4)Least common multiple
gcd\mathrm{gcd}gcd(6,12,18)Greatest common divisor
mod\mathrm{mod}mod(17,5)Remainder
ceil\mathrm{ceil}ceil(13.5)Least integer not below the value
floor\mathrm{floor}floor(13.5)Greatest integer not above the value
round\mathrm{round}round(1.32,2)Round to a specified place
sign\mathrm{sign}sign(-20)Sign
nthroot\mathrm{nthroot}nthroot(x,n)nth root
nPr\mathrm{nPr}nPr(6,2)Permutations
nCr\mathrm{nCr}nCr(6,2)Binomial coefficient

Actions and local variables​

SyntaxInputMeaning
→\mathrm{\to}a->a+1Update a variable
with\mathrm{with}y=x+a with a=2Substitute a variable locally

Complex numbers​

FunctionInputMeaning
real\mathrm{real}real(2+4i)Real part
imag\mathrm{imag}imag(2+4i)Imaginary part
conj\mathrm{conj}conj(2+4i)Complex conjugate
arg\mathrm{arg}arg(2+4i)Argument
∣z∣\lvert z\rvert|2+4i|Magnitude

Geometry​

Function or symbolInputMeaning
midpoint\mathrm{midpoint}midpoint((1,0),(2,1))Midpoint of two points
distance\mathrm{distance}distance((1,0),(2,1))Distance between two points
polygon\mathrm{polygon}polygon((0,0),(1,0),(0,1))Polygon
⋅\mathrm{\cdot}(1,0)*(0,1)Dot product
×\mathrm{\times}(1,0,0)cross(0,1,0)Cross product in 3D
∣v∣\lvert v\rvert|(1,2)|Vector magnitude

Polar coordinates, constants, and viewport​

Symbol or valueInputMeaning
θ\thetathetaPolar angle
rrrDistance from the origin
π\pipiPi
τ\tautauTwo times pi
eeeEuler’s number
∼\sim~Regression model
∞\inftyinfinityInfinity
width\mathrm{width}widthViewport width
height\mathrm{height}heightViewport height

3D Calculator​

The functions above generally remain available, with these additional coordinates and functions.

Spherical and cylindrical coordinates​

SymbolInputMeaning
ρ\rhorhoDistance from the origin in spherical coordinates
θ\thetathetaAzimuth
ϕ\phiphiPolar angle
rrrDistance from the zz axis in cylindrical coordinates

3D geometry​

Function or propertyInputMeaning
segment\mathrm{segment}segment((0,0,0),(2,2,2))Line segment
triangle\mathrm{triangle}triangle((0,0,0),(2,2,2),(1,3,2))Triangle
sphere\mathrm{sphere}sphere((0,0,0),1)Sphere from a center and radius
vector\mathrm{vector}vector((0,0,0),(1,1,1))Vector from start and end points
length\mathrm{length}length(v_1)Length of a vector or segment
.start\mathrm{.start}v_1.startVector start point
.end\mathrm{.end}v_1.endVector end point

Reference​

Supported Functions — Desmos Help Center