# Calc89 command reference > 281 TI-89 Titanium CAS commands supported by Calc89, a CAS graphing calculator app intended for use with TI-89 Titanium. Each entry: syntax, what it does, one example verified by the Calc89 CAS (input → exact result) and the page URL. Names marked ⁺ are Calc89 additions in TI-Nspire CAS style and are not on the TI-89 Titanium handheld. Index: https://calc89.com/commands/ ## Algebra - [approx(](https://calc89.com/commands/approx/): `approx(expr)`. Evaluates an expression numerically and returns a decimal approximation, even when the calculator is in exact mode. Use it to check an exact answer such as π or √(2) as a decimal. Example: `approx(π)` → `3.14159265359` - [cFactor(](https://calc89.com/commands/cfactor/): `cFactor(expr[, var])`. Factors an expression over the complex numbers, so factors with non-real coefficients such as x+ⅈ are allowed. Use it when factor( leaves a quadratic that has no real roots. Example: `cFactor(x^2+1)` → `(x+ⅈ)·(x−ⅈ)` - [comDenom(](https://calc89.com/commands/comdenom/): `comDenom(expr[, var])`. Combines a sum of fractions into one reduced fraction over a common denominator. Useful for simplifying rational expressions before solving or integrating. Example: `comDenom(2+1/x)` → `(2·x+1)/x` - [completeSquare(⁺](https://calc89.com/commands/completesquare/): `completeSquare(expr, var)`. Rewrites a quadratic expression in completed square form. In class it is the quick way to read off the vertex of a parabola. Example: `completeSquare(x^2+3x,x)` → `(x+3/2)^2−9/4` - [cPolyRoots(⁺](https://calc89.com/commands/cpolyroots/): `cPolyRoots(poly[, var])`. Returns all roots of a polynomial as a list, including non-real complex roots. Example: `cPolyRoots(x^2+1,x)` → `{−ⅈ,ⅈ}` - [cSolve(](https://calc89.com/commands/csolve/): `cSolve(equation, var)`. Solves an equation over the complex numbers and returns both real and non-real solutions. Use it when solve( finds no real solution, for example for x^2=−4. Example: `cSolve(x^2=-4,x)` → `x=−2·ⅈ or x=2·ⅈ` - [cZeros(](https://calc89.com/commands/czeros/): `cZeros(expr, var)`. Returns the real and non-real zeros of an expression as a list. It is the complex counterpart of zeros(. Example: `cZeros(x^2+1,x)` → `{−ⅈ,ⅈ}` - [domain(⁺](https://calc89.com/commands/domain/): `domain(expr, var)`. Returns the domain of an expression with respect to a variable as a condition, for example x≠0. Useful when checking where a function is defined. Example: `domain(1/x,x)` → `x≠0` - [exact(](https://calc89.com/commands/exact/): `exact(expr[, tol])`. Converts a decimal or approximate value into an exact rational form where possible. Use it to turn a decimal answer back into a fraction. Example: `exact(.25)` → `1/4` - [expand(](https://calc89.com/commands/expand/): `expand(expr[, var])`. Multiplies out products and powers in an expression and returns a sum of terms. It is the standard tool for expanding binomials and polynomial products. Example: `expand((x+1)^2)` → `x^2+2·x+1` - [exp▶list(](https://calc89.com/commands/exp-to-list/): `exp▶list(solution, var)`. Extracts the values from a solution such as x=1 or x=2 and returns them as a list. Useful when the solutions of solve( are needed in a further calculation. Example: `exp▶list(x=1 or x=2,x)` → `{1,2}` - [factor(](https://calc89.com/commands/factor/): `factor(expr[, var])`. Factors an expression over the rational numbers, for example a polynomial into linear and irreducible quadratic factors. With an integer it returns the prime factorization. Example: `factor(x^2-1)` → `(x−1)·(x+1)` - [getDenom(](https://calc89.com/commands/getdenom/): `getDenom(expr)`. Returns the denominator of a fraction after the expression has been reduced to a common denominator. Example: `getDenom(3/(x+2))` → `x+2` - [getNum(](https://calc89.com/commands/getnum/): `getNum(expr)`. Returns the numerator of a fraction after the expression has been reduced to a common denominator. Example: `getNum(3/(x+2))` → `3` - [left(](https://calc89.com/commands/left/): `left(equation or list[, n])`. Returns the left side of an equation or inequality. Given a list, it returns the first n elements. Example: `left(x+1=5)` → `x+1` - [linSolve(⁺](https://calc89.com/commands/linsolve/): `linSolve({equations}, {vars})`. Solves a system of linear equations and returns the values of the variables as a list. Example: `linSolve({x+y=3,x-y=1},{x,y})` → `{2,1}` - [nSolve(](https://calc89.com/commands/nsolve/): `nSolve(equation, var[, low, high])`. Finds one real solution of an equation numerically. Use it for equations that solve( cannot handle in exact form. Example: `nSolve(x^2=2,x)` → `1.41421356237` - [piecewise(⁺](https://calc89.com/commands/piecewise/): `piecewise(value1, condition1[, value2, condition2, …])`. Defines a piecewise function from pairs of values and conditions; each value applies where its condition is true. Example: `piecewise(x^2,x<0,x,x≥0)|x=-3` → `9` - [polyCoeffs(⁺](https://calc89.com/commands/polycoeffs/): `polyCoeffs(poly[, var])`. Returns the coefficients of a polynomial as a list, starting with the highest power. Example: `polyCoeffs(x^2-1)` → `{1,0,−1}` - [polyDegree(⁺](https://calc89.com/commands/polydegree/): `polyDegree(poly[, var])`. Returns the degree of a polynomial, the highest power of the variable that occurs. Example: `polyDegree(x^3+x,x)` → `3` - [polyGcd(⁺](https://calc89.com/commands/polygcd/): `polyGcd(poly1, poly2)`. Returns the greatest common divisor of two polynomials. Example: `polyGcd(2x+2,4x+4)` → `2·x+2` - [polyQuotient(⁺](https://calc89.com/commands/polyquotient/): `polyQuotient(poly1, poly2[, var])`. Divides one polynomial by another and returns the quotient, as in polynomial long division. Example: `polyQuotient(x^3-1,x+1,x)` → `x^2−x+1` - [polyRemainder(⁺](https://calc89.com/commands/polyremainder/): `polyRemainder(poly1, poly2[, var])`. Divides one polynomial by another and returns the remainder, as in polynomial long division. Example: `polyRemainder(x^3-1,x+1,x)` → `−2` - [polyRoots(⁺](https://calc89.com/commands/polyroots/): `polyRoots(poly[, var])`. Returns the real roots of a polynomial as a list. Example: `polyRoots(x^2-5x+6,x)` → `{2,3}` - [propFrac(](https://calc89.com/commands/propfrac/): `propFrac(expr[, var])`. Rewrites a fraction as a proper fraction: a whole part plus a remainder fraction. It works for numbers and for rational expressions in a variable. Example: `propFrac(7/3)` → `2+1/3` - [right(](https://calc89.com/commands/right/): `right(equation or list[, n])`. Returns the right side of an equation or inequality. Given a list, it returns the last n elements. Example: `right(x+1=5)` → `5` - [solve(](https://calc89.com/commands/solve/): `solve(equation, var)`. Solves an equation or inequality for a variable and returns the real solutions, joined with or. It is the main command for solving equations symbolically in algebra and precalculus. Example: `solve(x^2=9,x)` → `x=−3 or x=3` - [tCollect(](https://calc89.com/commands/tcollect/): `tCollect(expr)`. Collects products and integer powers of sines and cosines into sines and cosines of multiple angles. It is the reverse of tExpand( and helps to simplify trigonometric expressions. Example: `tCollect(cos(a)^2)` → `cos(2·a)/2+1/2` - [tExpand(](https://calc89.com/commands/texpand/): `tExpand(expr)`. Expands sines and cosines of sums and multiple angles into products of sines and cosines of single angles. Use it to check double angle and angle sum formulas. Example: `tExpand(sin(2x))` → `2·sin(x)·cos(x)` - [when(](https://calc89.com/commands/when/): `when(condition, trueValue[, falseValue[, unknownValue]])`. Returns one of several values depending on whether a condition is true, false or undecided. Used to define piecewise functions in a single line. Example: `when(x>0,1,-1)|x=2` → `1` - [zeros(](https://calc89.com/commands/zeros/): `zeros(expr, var)`. Returns the real values of the variable that make an expression zero, as a list. It gives the same values as solving expr=0, in list form. Example: `zeros(x^2-9,x)` → `{−3,3}` ## Calculus - [arcLen(](https://calc89.com/commands/arclen/): `arcLen(expr, var, lower, upper)`. Returns the arc length of the graph of an expression between two values of the variable. Example: `arcLen(x^(3/2),x,0,4)` → `80·√(10)/27−8/27` - [d(](https://calc89.com/commands/d/): `d(expr, var[, order])`. Differentiates an expression symbolically with respect to a variable. With an order argument it returns higher derivatives. Example: `d(x^3,x)` → `3·x^2` - [deSolve(](https://calc89.com/commands/desolve/): `deSolve(equation, var, depVar)`. Solves first and second order ordinary differential equations symbolically. The general solution contains arbitrary constants such as @1; adding initial conditions with and gives a particular solution. Example: `deSolve(y'=x,x,y)` → `y=x^2/2+@1` - [dominantTerm(⁺](https://calc89.com/commands/dominantterm/): `dominantTerm(expr, var[, point])`. Returns the term of an expression that dominates near a point, for example as the variable tends to infinity. Example: `dominantTerm(x^3+x,x,∞)` → `x^3` - [euler(⁺](https://calc89.com/commands/euler/): `euler(Expr, Var, DepVar, {Var0, VarMax}, DepVar0, VarStep[, eulerStep])`. Solves a differential equation numerically with Euler's method and returns a matrix with the variable values in the first row and the solution values in the second. Example: `euler(0.001·y·(100−y),t,y,{0,2},10,1)` → `[[0.0,1.0,2.0][10.0,10.9,11.87119]]` - [fMax(](https://calc89.com/commands/fmax/): `fMax(expr, var)`. Returns the value of the variable at which an expression reaches its maximum, as a condition such as x=1. Used for optimization problems in calculus. Example: `fMax(-x^2+2x,x)` → `x=1` - [fMin(](https://calc89.com/commands/fmin/): `fMin(expr, var)`. Returns the value of the variable at which an expression reaches its minimum, as a condition such as x=2. Used for optimization problems in calculus. Example: `fMin(x^2-4x,x)` → `x=2` - [impDif(](https://calc89.com/commands/impdif/): `impDif(equation, var, depVar[, order])`. Computes the derivative dy/dx of an equation that defines y implicitly in terms of x. Example: `impDif(x^2+y^2=1,x,y)` → `−x/y` - [limit(](https://calc89.com/commands/limit/): `limit(expr, var, point[, direction])`. Computes the limit of an expression as the variable approaches a point, including ∞. A direction argument gives one sided limits. Example: `limit(sin(x)/x,x,0)` → `1` - [nDeriv(](https://calc89.com/commands/nderiv/): `nDeriv(expr, var[, h])`. Approximates the derivative of an expression numerically with a central difference quotient. Example: `nDeriv(x^3,x)|x=2` → `12.0` - [nDerivative(⁺](https://calc89.com/commands/nderivative/): `nDerivative(expr, var=value[, order])`. Computes the numerical derivative of an expression at a given value of the variable. Example: `nDerivative(x^3,x=2)` → `12.0` - [nfMax(⁺](https://calc89.com/commands/nfmax/): `nfMax(expr, var, low, high)`. Finds the location of a maximum of an expression numerically within an interval. Example: `nfMax(-x^2+2x,x,-10,10)` → `1.0` - [nfMin(⁺](https://calc89.com/commands/nfmin/): `nfMin(expr, var, low, high)`. Finds the location of a minimum of an expression numerically within an interval. Example: `nfMin(x^2-4x,x,-10,10)` → `2.0` - [nInt(](https://calc89.com/commands/nint/): `nInt(expr, var, lower, upper)`. Approximates a definite integral numerically. Use it when an integral has no closed form or only a decimal value is needed. Example: `nInt(x^2,x,0,1)` → `0.333333333333` - [normalLine(⁺](https://calc89.com/commands/normalline/): `normalLine(expr, var, point)`. Returns the equation of the normal line to the graph of an expression at a point, the line perpendicular to the tangent. Example: `normalLine(x^2,x,1)` → `−x/2+3/2` - [rk23(⁺](https://calc89.com/commands/rk23/): `rk23(Expr, Var, DepVar, {Var0, VarMax}, DepVar0, VarStep[, diftol])`. Solves a differential equation numerically with an adaptive Runge Kutta method and returns a matrix with the variable values in the first row and the solution values in the second. Example: `rk23(0.001·y·(100−y),t,y,{0,1},10,1)` → `[[0.0,1.0][10.0,10.9366808323]]` - [series(⁺](https://calc89.com/commands/series/): `series(expr, var, order[, point])`. Returns a power series expansion of an expression up to a given order. Example: `series(sin(x),x,5)` → `x^5/120−x^3/6+x` - [tangentLine(⁺](https://calc89.com/commands/tangentline/): `tangentLine(expr, var, point)`. Returns the equation of the tangent line to the graph of an expression at a point. Example: `tangentLine(x^2,x,1)` → `2·x−1` - [taylor(](https://calc89.com/commands/taylor/): `taylor(expr, var, order[, point])`. Returns the Taylor polynomial of an expression up to a given order, around 0 or around a chosen point. Example: `taylor(ℯ^(x),x,4)` → `x^4/24+x^3/6+x^2/2+x+1` - [Π(](https://calc89.com/commands/product-pi/): `Π(expr, var, low, high)`. Computes the product of an expression as the variable runs from a lower to an upper value. Example: `Π(k,k,1,5)` → `120` - [Σ(](https://calc89.com/commands/sum-sigma/): `Σ(expr, var, low, high)`. Computes the sum of an expression as the variable runs from a lower to an upper value. Used for sigma notation and series in class. Example: `Σ(k,k,1,10)` → `55` - [∫(](https://calc89.com/commands/integral/): `∫(expr, var[, lower, upper])`. Integrates an expression with respect to a variable. Without limits it returns an antiderivative; with lower and upper limits it returns the exact definite integral. Example: `∫(x,x)` → `x^2/2` ## Matrix - [.*](https://calc89.com/commands/dot-times/): `Matrix1 .* Matrix2`. Multiplies two matrices element by element, unlike the normal matrix product. Example: `[1,2;3,4].*[1,2;3,4]` → `[[1,4][9,16]]` - [.+](https://calc89.com/commands/dot-plus/): `Matrix1 .+ Matrix2`. Adds element by element: each entry of the first matrix is added to the matching entry of the second, or to a single value. Example: `[1,2;3,4].+10` → `[[11,12][13,14]]` - [.-](https://calc89.com/commands/dot-minus/): `Matrix1 .- Matrix2`. Subtracts element by element: the matching entry of the second matrix, or a single value, is subtracted from each entry. Example: `[5,6;7,8].-1` → `[[4,5][6,7]]` - [./](https://calc89.com/commands/dot-divide/): `Matrix1 ./ Matrix2`. Divides element by element: each entry is divided by the matching entry of the second matrix, or by a single value. Example: `[2,4;6,8]./2` → `[[1,2][3,4]]` - [.^](https://calc89.com/commands/dot-power/): `Matrix1 .^ Matrix2`. Raises each entry of a matrix to a power element by element, instead of computing a matrix power. Example: `[1,2;3,4].^2` → `[[1,4][9,16]]` - [augment(](https://calc89.com/commands/augment/): `augment(matrix1, matrix2)`. Joins two matrices side by side, appending the columns of the second to the first. A common use is building the augmented matrix of a linear system. Example: `augment([[1,2][3,4]],[[5][6]])` → `[[1,2,5][3,4,6]]` - [charPoly(⁺](https://calc89.com/commands/charpoly/): `charPoly(squareMatrix, Var or Expr)`. Returns the characteristic polynomial of a square matrix in the given variable. Its zeros are the eigenvalues of the matrix. Example: `charPoly([1,2;3,4],x)` → `x^2−5·x−2` - [colAugment(⁺](https://calc89.com/commands/colaugment/): `colAugment(Matrix1, Matrix2)`. Stacks two matrices vertically, appending the rows of the second below the first. Example: `colAugment([1,2],[3,4])` → `[[1,2][3,4]]` - [colDim(](https://calc89.com/commands/coldim/): `colDim(expr)`. Returns the number of columns of a matrix. Example: `colDim([[1,2,3][4,5,6]])` → `3` - [colNorm(](https://calc89.com/commands/colnorm/): `colNorm(Matrix)`. Returns the column norm of a matrix, the largest sum of the absolute values of the entries in any column. Example: `colNorm([1,-2;3,4])` → `6` - [constructMat(⁺](https://calc89.com/commands/constructmat/): `constructMat(Expr, Var1, Var2, numRows, numCols)`. Builds a matrix by evaluating an expression in two index variables for every row and column position. Example: `constructMat(i+j,i,j,2,3)` → `[[2,3,4][3,4,5]]` - [crossP(](https://calc89.com/commands/crossp/): `crossP(vector1, vector2)`. Returns the cross product of two vectors. Example: `crossP([1,0,0],[0,1,0])` → `[[0,0,1]]` - [det(](https://calc89.com/commands/det/): `det(expr)`. Returns the determinant of a square matrix. Example: `det([[1,2][3,4]])` → `−2` - [diag(](https://calc89.com/commands/diag/): `diag(expr)`. Returns the main diagonal of a square matrix as a row vector. Example: `diag([1,2;3,4])` → `[[1,4]]` - [dim(](https://calc89.com/commands/dim/): `dim(matrix or list)`. Returns the dimensions of a matrix as {rows, columns}, or the number of elements of a list. Example: `dim([[1,2,3][4,5,6]])` → `{2,3}` - [dotP(](https://calc89.com/commands/dotp/): `dotP(vector1, vector2)`. Returns the dot product of two vectors. Example: `dotP([1,2,3],[4,5,6])` → `32` - [eigVc(](https://calc89.com/commands/eigvc/): `eigVc(expr)`. Returns the eigenvectors of a square matrix as the columns of a matrix. Example: `eigVc([2,0;0,3])` → `[[1,0][0,1]]` - [eigVl(](https://calc89.com/commands/eigvl/): `eigVl(expr)`. Returns the eigenvalues of a square matrix as a list. Example: `eigVl([2,0;0,3])` → `{2,3}` - [Fill](https://calc89.com/commands/fill/): `Fill Expr, matrixVar or listVar`. Replaces every element of an existing list or matrix variable with the same value. Example: `{1,2,3}→a:Fill 7,a:a` → `{7,7,7}` - [identity(](https://calc89.com/commands/identity/): `identity(n)`. Returns the identity matrix of size n by n. Example: `identity(3)` → `[[1,0,0][0,1,0][0,0,1]]` - [inverse(⁺](https://calc89.com/commands/inverse/): `inverse(expr)`. Returns the inverse of a square matrix, the same result as raising it to the power −1. Example: `inverse([1,2;3,4])` → `[[−2,1][3/2,−1/2]]` - [list▶mat(](https://calc89.com/commands/list-to-mat/): `list▶mat(list, cols)`. Converts a list into a matrix, filling it row by row with the given number of columns. Example: `list▶mat({1,2,3,4},2)` → `[[1,2][3,4]]` - [LU](https://calc89.com/commands/lu/): `LU Matrix, lMatrix, uMatrix, pMatrix[, Tol]`. Computes the LU decomposition of a matrix with partial pivoting and stores the lower, upper and permutation matrices in variables. Example: `LU [1,2;3,4],l,u,p:u` → `[[3,4][0,2/3]]` - [mat▶list(](https://calc89.com/commands/mat-to-list/): `mat▶list(matrix)`. Returns the entries of a matrix as one list, row by row. Example: `mat▶list([[1,2][3,4]])` → `{1,2,3,4}` - [mRow(](https://calc89.com/commands/mrow/): `mRow(value, matrix, row)`. Multiplies one row of a matrix by a value, one of the elementary row operations of Gaussian elimination. Example: `mRow(3,[[1,2][3,4]],2)` → `[[1,2][9,12]]` - [mRowAdd(](https://calc89.com/commands/mrowadd/): `mRowAdd(value, matrix, row1, row2)`. Multiplies one row of a matrix by a value and adds the result to another row, the key step of Gaussian elimination. Example: `mRowAdd(-2,[[1,2][3,4]],1,2)` → `[[1,2][1,0]]` - [newMat(](https://calc89.com/commands/newmat/): `newMat(rows, cols)`. Returns a matrix of zeros with the given number of rows and columns. Example: `newMat(2,3)` → `[[0,0,0][0,0,0]]` - [norm(](https://calc89.com/commands/norm/): `norm(expr)`. Returns the Frobenius norm of a matrix; for a vector this is its length. Example: `norm([3,4])` → `5` - [QR](https://calc89.com/commands/qr/): `QR Matrix, qMatrix, rMatrix[, Tol]`. Computes the QR factorization of a matrix and stores the orthogonal matrix q and the upper triangular matrix r in variables. Example: `QR [3,0;4,5],q,r:r` → `[[5,4][0,3]]` - [randMat(](https://calc89.com/commands/randmat/): `randMat(numRows, numColumns)`. Returns a matrix of the given size filled with random integers. Example: `dim(randMat(2,3))` → `{2,3}` - [ref(](https://calc89.com/commands/ref/): `ref(expr)`. Returns the row echelon form of a matrix, the result of forward Gaussian elimination. Example: `ref([[2,4,6][1,1,1]])` → `[[1,2,3][0,1,2]]` - [rowAdd(](https://calc89.com/commands/rowadd/): `rowAdd(matrix, row1, row2)`. Adds one row of a matrix to another row and returns the new matrix. Example: `rowAdd([[1,2][3,4]],1,2)` → `[[1,2][4,6]]` - [rowDim(](https://calc89.com/commands/rowdim/): `rowDim(expr)`. Returns the number of rows of a matrix. Example: `rowDim([[1,2,3][4,5,6]])` → `2` - [rowNorm(](https://calc89.com/commands/rownorm/): `rowNorm(Matrix)`. Returns the row norm of a matrix, the largest sum of the absolute values of the entries in any row. Example: `rowNorm([1,-2;3,4])` → `7` - [rowSwap(](https://calc89.com/commands/rowswap/): `rowSwap(matrix, row1, row2)`. Swaps two rows of a matrix and returns the new matrix. Example: `rowSwap([[1,2,3][4,5,6][7,8,9]],1,3)` → `[[7,8,9][4,5,6][1,2,3]]` - [rref(](https://calc89.com/commands/rref/): `rref(expr)`. Returns the reduced row echelon form of a matrix. Applied to an augmented matrix, it solves a system of linear equations. Example: `rref([1,2;3,4])` → `[[1,0][0,1]]` - [simult(](https://calc89.com/commands/simult/): `simult(coefMatrix, constMatrix)`. Solves a system of linear equations given as a coefficient matrix and a column of constants, and returns the solution as a column vector. Example: `simult([1,1;1,-1],[3;1])` → `[[2][1]]` - [subMat(](https://calc89.com/commands/submat/): `subMat(matrix[, r1, c1, r2, c2])`. Returns the part of a matrix between a start row and column and an end row and column. Example: `subMat([[1,2,3][4,5,6][7,8,9]],2,1,3,2)` → `[[4,5][7,8]]` - [trace(](https://calc89.com/commands/trace/): `trace(expr)`. Returns the trace of a square matrix, the sum of the entries on its main diagonal. Example: `trace([[1,2][3,4]])` → `5` - [transpose(⁺](https://calc89.com/commands/transpose/): `transpose(expr)`. Returns the transpose of a matrix, with rows and columns swapped. Example: `transpose([1,2;3,4])` → `[[1,3][2,4]]` - [unitV(](https://calc89.com/commands/unitv/): `unitV(expr)`. Returns the unit vector in the direction of a vector, the vector divided by its length. Example: `unitV([3,4])` → `[[3/5,4/5]]` ## List - [cumSum(](https://calc89.com/commands/cumsum/): `cumSum(list)`. Returns a list of the running totals of a list's elements. Example: `cumSum({1,2,3,4})` → `{1,3,6,10}` - [deltaList(](https://calc89.com/commands/deltalist/): `deltaList(list)`. Returns a list of the differences between consecutive elements of a list. Example: `deltaList({1,4,9,16})` → `{3,5,7}` - [product(](https://calc89.com/commands/product/): `product(list[, start[, end]])`. Returns the product of the elements of a list. Example: `product({2,3,4})` → `24` - [seq(](https://calc89.com/commands/seq/): `seq(Expr, Var, Low, High[, Step])`. Builds a list by evaluating an expression as a variable runs from a low to a high value. Example: `seq(n^2,n,1,5)` → `{1,4,9,16,25}` - [SortA](https://calc89.com/commands/sorta/): `SortA List1[, List2]…`. Sorts a list variable in ascending order and stores the result back in the variable. Example: `{3,1,2}→l:SortA l:l` → `{1,2,3}` - [SortD](https://calc89.com/commands/sortd/): `SortD List1[, List2]…`. Sorts a list variable in descending order and stores the result back in the variable. Example: `{3,1,2}→l:SortD l:l` → `{3,2,1}` - [sum(](https://calc89.com/commands/sum/): `sum(list[, start[, end]])`. Returns the sum of the elements of a list. Example: `sum({1,2,3,4})` → `10` ## Trigonometry - [cos(](https://calc89.com/commands/cos/): `cos(expr)`. Returns the cosine of an angle, interpreted in the current angle mode. For standard angles such as π/3 the result is exact. Example: `cos(π/3)` → `1/2` - [cosh(](https://calc89.com/commands/cosh/): `cosh(expr)`. Returns the hyperbolic cosine of a value. Example: `cosh(0)` → `1` - [cosh⁻¹(](https://calc89.com/commands/cosh-inverse/): `cosh⁻¹(expr)`. Returns the inverse hyperbolic cosine of a value. Example: `cosh⁻¹(2.)` → `1.31695789692` - [cos⁻¹(](https://calc89.com/commands/cos-inverse/): `cos⁻¹(expr)`. Returns the angle whose cosine is the given value, in the current angle mode. For standard values the angle is exact, for example a multiple of π. Example: `cos⁻¹(1/2)` → `π/3` - [cot(](https://calc89.com/commands/cot/): `cot(expr)`. Returns the cotangent of an angle, interpreted in the current angle mode. Example: `cot(π/4)` → `1` - [coth(](https://calc89.com/commands/coth/): `coth(expr)`. Returns the hyperbolic cotangent of a value. Example: `coth(0.5)` → `2.16395341374` - [coth⁻¹(](https://calc89.com/commands/coth-inverse/): `coth⁻¹(expr)`. Returns the inverse hyperbolic cotangent of a value. Example: `coth⁻¹(2)` → `tanh⁻¹(1/2)` - [cot⁻¹(](https://calc89.com/commands/cot-inverse/): `cot⁻¹(expr)`. Returns the angle whose cotangent is the given value, in the current angle mode. For standard values the angle is exact, for example a multiple of π. Example: `cot⁻¹(1)` → `π/4` - [csc(](https://calc89.com/commands/csc/): `csc(expr)`. Returns the cosecant of an angle, interpreted in the current angle mode. Example: `csc(π/2)` → `1` - [csch(](https://calc89.com/commands/csch/): `csch(expr)`. Returns the hyperbolic cosecant of a value. Example: `csch(1.)` → `0.850918128239` - [csch⁻¹(](https://calc89.com/commands/csch-inverse/): `csch⁻¹(expr)`. Returns the inverse hyperbolic cosecant of a value. Example: `csch⁻¹(1)` → `sinh⁻¹(1)` - [csc⁻¹(](https://calc89.com/commands/csc-inverse/): `csc⁻¹(expr)`. Returns the angle whose cosecant is the given value, in the current angle mode. For standard values the angle is exact, for example a multiple of π. Example: `csc⁻¹(2)` → `π/6` - [P▶Rx(](https://calc89.com/commands/p-to-rx/): `P▶Rx(r, θ)`. Converts polar coordinates to the rectangular x coordinate, x=r·cos(θ). Example: `P▶Rx(2,π/3)` → `1` - [P▶Ry(](https://calc89.com/commands/p-to-ry/): `P▶Ry(r, θ)`. Converts polar coordinates to the rectangular y coordinate, y=r·sin(θ). Example: `P▶Ry(2,π/6)` → `1` - [R▶Pr(](https://calc89.com/commands/r-to-pr/): `R▶Pr(x, y)`. Converts rectangular coordinates to the polar radius r, the distance of the point from the origin. Example: `R▶Pr(3,4)` → `5` - [R▶Pθ(](https://calc89.com/commands/r-to-ptheta/): `R▶Pθ(x, y)`. Converts rectangular coordinates to the polar angle θ, in the current angle mode. Example: `R▶Pθ(1,1)` → `π/4` - [sec(](https://calc89.com/commands/sec/): `sec(expr)`. Returns the secant of an angle, interpreted in the current angle mode. Example: `sec(0)` → `1` - [sech(](https://calc89.com/commands/sech/): `sech(expr)`. Returns the hyperbolic secant of a value. Example: `sech(0)` → `1` - [sech⁻¹(](https://calc89.com/commands/sech-inverse/): `sech⁻¹(expr)`. Returns the inverse hyperbolic secant of a value. Example: `sech⁻¹(1)` → `cosh⁻¹(1)` - [sec⁻¹(](https://calc89.com/commands/sec-inverse/): `sec⁻¹(expr)`. Returns the angle whose secant is the given value, in the current angle mode. For standard values the angle is exact, for example a multiple of π. Example: `sec⁻¹(2)` → `π/3` - [sin(](https://calc89.com/commands/sin/): `sin(expr)`. Returns the sine of an angle, interpreted in the current angle mode. For standard angles such as π/3 the result is exact. Example: `sin(π/6)` → `1/2` - [sinh(](https://calc89.com/commands/sinh/): `sinh(expr)`. Returns the hyperbolic sine of a value. Example: `sinh(0)` → `0` - [sinh⁻¹(](https://calc89.com/commands/sinh-inverse/): `sinh⁻¹(expr)`. Returns the inverse hyperbolic sine of a value. Example: `sinh⁻¹(1.)` → `0.88137358702` - [sin⁻¹(](https://calc89.com/commands/sin-inverse/): `sin⁻¹(expr)`. Returns the angle whose sine is the given value, in the current angle mode. For standard values the angle is exact, for example a multiple of π. Example: `sin⁻¹(1/2)` → `π/6` - [tan(](https://calc89.com/commands/tan/): `tan(expr)`. Returns the tangent of an angle, interpreted in the current angle mode. For standard angles such as π/3 the result is exact. Example: `tan(π/3)` → `√(3)` - [tanh(](https://calc89.com/commands/tanh/): `tanh(expr)`. Returns the hyperbolic tangent of a value. Example: `tanh(0)` → `0` - [tanh⁻¹(](https://calc89.com/commands/tanh-inverse/): `tanh⁻¹(expr)`. Returns the inverse hyperbolic tangent of a value. Example: `tanh⁻¹(0.5)` → `0.549306144334` - [tan⁻¹(](https://calc89.com/commands/tan-inverse/): `tan⁻¹(expr)`. Returns the angle whose tangent is the given value, in the current angle mode. For standard values the angle is exact, for example a multiple of π. Example: `tan⁻¹(1)` → `π/4` ## Number functions - [abs(](https://calc89.com/commands/abs/): `abs(expr)`. Returns the absolute value of a number, or the modulus of a complex number. Example: `abs(-3)` → `3` - [angle(](https://calc89.com/commands/angle/): `angle(expr)`. Returns the argument of a complex number, the angle of its point in the complex plane. Example: `angle(1+ⅈ)` → `π/4` - [ans(](https://calc89.com/commands/ans/): `ans([n])`. Recalls a previous answer from the home screen history: ans(1) is the last answer, ans(2) the one before. Example: `2+3` → `5` - [ceiling(](https://calc89.com/commands/ceiling/): `ceiling(expr)`. Returns the smallest integer that is greater than or equal to a value. Example: `ceiling(2.1)` → `3.0` - [conj(](https://calc89.com/commands/conj/): `conj(expr)`. Returns the complex conjugate of a number, with the sign of the imaginary part changed. Example: `conj(3+4ⅈ)` → `3−4·ⅈ` - [entry(](https://calc89.com/commands/entry/): `entry([n])`. Recalls a previous entry from the home screen history so it can be evaluated again. Example: `entry(2)` → `10` - [floor(](https://calc89.com/commands/floor/): `floor(expr)`. Returns the largest integer that is less than or equal to a value. Example: `floor(2.7)` → `2.0` - [fPart(](https://calc89.com/commands/fpart/): `fPart(expr)`. Returns the fractional part of a number, the part after the decimal point. Example: `fPart(3.25)` → `0.25` - [gcd(](https://calc89.com/commands/gcd/): `gcd(a, b)`. Returns the greatest common divisor of two integers. Example: `gcd(12,18)` → `6` - [imag(](https://calc89.com/commands/imag/): `imag(expr)`. Returns the imaginary part of a complex number. Example: `imag(3+4ⅈ)` → `4` - [iPart(](https://calc89.com/commands/ipart/): `iPart(expr)`. Returns the integer part of a number, truncated toward zero. Example: `iPart(-3.7)` → `−3.0` - [lcm(](https://calc89.com/commands/lcm/): `lcm(a, b)`. Returns the least common multiple of two integers. Example: `lcm(4,6)` → `12` - [ln(](https://calc89.com/commands/ln/): `ln(expr)`. Returns the natural logarithm of a value, the logarithm to base ℯ. Example: `ln(ℯ)` → `1` - [log(](https://calc89.com/commands/log/): `log(value[, base])`. Returns the common logarithm of a value, or the logarithm to a given base. Example: `log(1000)` → `3` - [max(](https://calc89.com/commands/max/): `max(a[, b])`. Returns the larger of two values, or the largest element of a list. Example: `max({1,5,2})` → `5` - [min(](https://calc89.com/commands/min/): `min(a[, b])`. Returns the smaller of two values, or the smallest element of a list. Example: `min(3,7)` → `3` - [mod(](https://calc89.com/commands/mod/): `mod(a, b)`. Returns a modulo b, the remainder of the division with the sign of b. Example: `mod(7,3)` → `1` - [real(](https://calc89.com/commands/real/): `real(expr)`. Returns the real part of a complex number. Example: `real(3+4ⅈ)` → `3` - [remain(](https://calc89.com/commands/remain/): `remain(a, b)`. Returns the remainder of a divided by b, with the sign of a. Example: `remain(17,5)` → `2` - [root(⁺](https://calc89.com/commands/root/): `root(value, n)`. Returns the n-th root of a value, for example the cube root for n=3. Example: `root(27,3)` → `3` - [round(](https://calc89.com/commands/round/): `round(value[, digits])`. Rounds a value to a given number of decimal places. Example: `round(3.14159,2)` → `3.14` - [sign(](https://calc89.com/commands/sign/): `sign(expr)`. Returns the sign of a value: 1 for positive and −1 for negative numbers. Example: `sign(-5)` → `−1` - [√(](https://calc89.com/commands/sqrt/): `√(value)`. Returns the square root of a value. Exact results are simplified, so √(8) becomes 2·√(2). Example: `√(8)` → `2·√(2)` ## Special functions - [Chi(⁺](https://calc89.com/commands/chi/): `Chi(expr)`. Returns the hyperbolic cosine integral of a value. Example: `Chi(1.)` → `0.83786694098` - [Ci(⁺](https://calc89.com/commands/ci/): `Ci(expr)`. Returns the cosine integral of a value. Example: `Ci(1.)` → `0.337403922901` - [dilog(⁺](https://calc89.com/commands/dilog/): `dilog(expr)`. Returns the dilogarithm of a value; dilog(1) is π^2/6. Example: `dilog(1)` → `π^2/6` - [Ei(⁺](https://calc89.com/commands/ei/): `Ei(expr)`. Returns the exponential integral of a value. Example: `Ei(1.)` → `1.89511781636` - [erf(⁺](https://calc89.com/commands/erf/): `erf(expr)`. Returns the error function of a value, which is closely related to the normal distribution. Example: `erf(0)` → `0` - [erfc(⁺](https://calc89.com/commands/erfc/): `erfc(expr)`. Returns the complementary error function, 1 minus erf of the value. Example: `erfc(0)` → `1` - [erfi(⁺](https://calc89.com/commands/erfi/): `erfi(expr)`. Returns the imaginary error function of a value. Example: `erfi(0)` → `0` - [fresnelC(⁺](https://calc89.com/commands/fresnelc/): `fresnelC(expr)`. Returns the Fresnel cosine integral of a value. Example: `fresnelC(0)` → `0` - [fresnelS(⁺](https://calc89.com/commands/fresnels/): `fresnelS(expr)`. Returns the Fresnel sine integral of a value. Example: `fresnelS(0)` → `0` - [gamma(⁺](https://calc89.com/commands/gamma/): `gamma(expr)`. Returns the gamma function of a value; for a positive integer n, gamma(n) equals (n−1)!. Example: `gamma(5)` → `24` - [gammaInc(⁺](https://calc89.com/commands/gammainc/): `gammaInc(a, x)`. Returns the incomplete gamma function of a and x. Example: `gammaInc(1,0)` → `1` - [li(⁺](https://calc89.com/commands/li/): `li(expr)`. Returns the logarithmic integral of a value. Example: `li(2.)` → `1.04516378012` - [polylog(⁺](https://calc89.com/commands/polylog/): `polylog(n, expr)`. Returns the polylogarithm of order n of a value. Example: `polylog(2,1)` → `π^2/6` - [Shi(⁺](https://calc89.com/commands/shi/): `Shi(expr)`. Returns the hyperbolic sine integral of a value. Example: `Shi(0)` → `0` - [Si(⁺](https://calc89.com/commands/si/): `Si(expr)`. Returns the sine integral of a value. Example: `Si(0)` → `0` ## Units - [tmpCnv(](https://calc89.com/commands/tmpcnv/): `tmpCnv(temperature_°C, _°F)`. Converts a temperature from one unit to another, for example from °C to °F, including the offset between the scales. Example: `tmpCnv(100_°C,_°F)` → `212·_°F` - [ΔtmpCnv(](https://calc89.com/commands/delta-tmpcnv/): `ΔtmpCnv(difference_°C, _°F)`. Converts a temperature difference from one unit to another; only the scale changes, the offset between the scales is ignored. Example: `ΔtmpCnv(10_°C,_°F)` → `18·_°F` ## Variables and memory - [Define](https://calc89.com/commands/define/): `Define f(x)=expr`. Defines a user function or variable that can be used in later calculations, for example f(x). Example: `Define f(x)=x^2+1` → `Done` - [DelVar](https://calc89.com/commands/delvar/): `DelVar var[, var…]`. Deletes variables from memory so they are undefined again. This matters for symbolic work, because a stored value would otherwise be substituted into every result. Example: `5→a` → `5` - [getLockInfo(⁺](https://calc89.com/commands/getlockinfo/): `getLockInfo(Var)`. Returns 1 if a variable is locked and 0 if it is not. Example: `getLockInfo(a)` → `0` - [Lock](https://calc89.com/commands/lock/): `Lock Var1[, Var2]…`. Locks variables so they cannot be changed or deleted until they are unlocked. Example: `5→a:Lock a` → `Done` - [NewProb](https://calc89.com/commands/newprob/): `NewProb`. Starts a new problem by clearing single letter variables, so values stored earlier do not affect new calculations. Example: `7→b` → `7` - [unLock](https://calc89.com/commands/unlock/): `unLock Var1[, Var2]…`. Unlocks variables that were locked with Lock, so they can be changed or deleted again. Example: `unLock a` → `Done` ## Conversions - [▶approxFraction(⁺](https://calc89.com/commands/to-approxfraction/): `Expr▶approxFraction([tol])`. Converts a decimal value into a fraction that approximates it within a tolerance. Example: `0.125▶approxFraction()` → `1/8` - [▶cos⁺](https://calc89.com/commands/to-cos/): `Expr▶cos`. Rewrites an expression in terms of cosine, for example sin(x)^2 as 1−cos(x)^2. Example: `sin(x)^2▶cos` → `1−cos(x)^2` - [▶Cylind](https://calc89.com/commands/to-cylind/): `Vector▶Cylind`. Displays a three element vector in cylindrical form, with radius, angle and height. Example: `[2,2,3]▶Cylind` → `[[2·√(2),∠π/4,3]]` - [▶DD](https://calc89.com/commands/to-dd/): `Expr▶DD`. Converts an angle to decimal degrees. Example: `(π/4)▶DD` → `45°` - [▶Decimal⁺](https://calc89.com/commands/to-decimal/): `Expr▶Decimal`. Displays a result as a decimal number instead of an exact value. Example: `1/3▶Decimal` → `0.333333333333` - [▶DMS](https://calc89.com/commands/to-dms/): `Expr▶DMS`. Displays an angle in degrees, minutes and seconds. Example: `45.371°▶DMS` → `45°22′15.6″` - [▶exp⁺](https://calc89.com/commands/to-exp/): `Expr▶exp`. Rewrites an expression in terms of the natural exponential ℯ^x, for example hyperbolic functions. Example: `cosh(x)▶exp` → `(ℯ^x+ℯ^(−x))/2` - [▶Grad](https://calc89.com/commands/to-grad/): `Expr▶Grad`. Converts an angle to gradians. Example: `90°▶Grad` → `100ᵍ` - [▶ln⁺](https://calc89.com/commands/to-ln/): `Expr▶ln`. Rewrites logarithms in an expression in terms of the natural logarithm ln. Example: `log(x)▶ln` → `ln(x)/ln(10)` - [▶logbase(⁺](https://calc89.com/commands/to-logbase/): `Expr▶logbase(base)`. Rewrites logarithms in an expression in terms of logarithms to a given base. Example: `ln(x)▶logbase(2)` → `ln(2)·log(x,2)` - [▶Polar](https://calc89.com/commands/to-polar/): `Expr▶Polar`. Displays a vector or complex number in polar form, with length and angle. Example: `[3,4]▶Polar` → `[[5,∠tan⁻¹(4/3)]]` - [▶Rad](https://calc89.com/commands/to-rad/): `Expr▶Rad`. Converts an angle to radians. Example: `180°▶Rad` → `πʳ` - [▶Rect](https://calc89.com/commands/to-rect/): `Expr▶Rect`. Displays a vector or complex number in rectangular form. Example: `[5,∠(π/2)]▶Rect` → `[[0,5]]` - [▶sin⁺](https://calc89.com/commands/to-sin/): `Expr▶sin`. Rewrites an expression in terms of sine, for example cos(x)^2 as 1−sin(x)^2. Example: `cos(x)^2▶sin` → `1−sin(x)^2` - [▶Sphere](https://calc89.com/commands/to-sphere/): `Vector▶Sphere`. Displays a three element vector in spherical form, with length and two angles. Example: `[1,2,3]▶Sphere` → `[[√(14),∠tan⁻¹(2),∠tan⁻¹(√(5)/3)]]` ## Probability - [nCr(](https://calc89.com/commands/ncr/): `nCr(Value1, Value2)`. Returns the number of combinations, the ways to choose r items from n when order does not matter. Example: `nCr(5,2)` → `10` - [nPr(](https://calc89.com/commands/npr/): `nPr(Value1, Value2)`. Returns the number of permutations, the ways to arrange r items chosen from n when order matters. Example: `nPr(5,2)` → `20` - [rand(](https://calc89.com/commands/rand/): `rand([#Trials])`. Returns a random number between 0 and 1, or a list of such numbers. Example: `dim(rand(3))` → `3` - [randBin(](https://calc89.com/commands/randbin/): `randBin(n, p[, #Trials])`. Returns a random number of successes from a binomial distribution, or a list of them. Example: `dim(randBin(10,1/2,5))` → `5` - [randInt(](https://calc89.com/commands/randint/): `randInt(Low, Up[, #Trials])`. Returns a random integer between two bounds, or a list of them. Example: `dim(randInt(1,6,3))` → `3` - [randNorm(](https://calc89.com/commands/randnorm/): `randNorm(μ, σ[, #Trials])`. Returns a random number from a normal distribution, or a list of them. Example: `dim(randNorm(0,1,4))` → `4` - [randSamp(](https://calc89.com/commands/randsamp/): `randSamp(List, #Trials[, NoRepl])`. Draws a random sample of elements from a list. Example: `RandSeed 7:randSamp({1,2,3,4,5},3)` → `{4,2,5}` - [RandSeed](https://calc89.com/commands/randseed/): `RandSeed Number`. Sets the seed of the random number generator, so a sequence of random results can be repeated exactly. Example: `RandSeed 7` → `Done` ## Distributions - [binomCdf(](https://calc89.com/commands/binomcdf/): `binomCdf(n, p[, [LowBound,] UpBound])`. Returns a cumulative binomial probability, the chance of a number of successes within a range. Example: `binomCdf(5,1/2,2)` → `1/2` - [binomPdf(](https://calc89.com/commands/binompdf/): `binomPdf(n, p[, XVal])`. Returns the binomial probability of exactly a given number of successes. Example: `binomPdf(5,1/2,2)` → `5/16` - [chi2Cdf(](https://calc89.com/commands/chi2cdf/): `chi2Cdf(LowBound, UpBound, df)`. Returns the χ² distribution probability between two bounds. Example: `chi2Cdf(0,3,2)` → `0.776869839852` - [chi2Pdf(](https://calc89.com/commands/chi2pdf/): `chi2Pdf(XVal, df)`. Returns the probability density of the χ² distribution at a value. Example: `chi2Pdf(1,2)` → `0.303265329856` - [FCdf(](https://calc89.com/commands/fcdf/): `FCdf(LowBound, UpBound, dfNumer, dfDenom)`. Returns the F distribution probability between two bounds. Example: `FCdf(0,2,5,10)` → `0.8358050491` - [FPdf(](https://calc89.com/commands/fpdf/): `FPdf(XVal, dfNumer, dfDenom)`. Returns the probability density of the F distribution at a value. Example: `FPdf(1,5,10)` → `0.495479783487` - [geomCdf(](https://calc89.com/commands/geomcdf/): `geomCdf(p[, LowBound], UpBound)`. Returns the cumulative geometric probability that the first success occurs within a range of trials. Example: `geomCdf(1/2,3)` → `7/8` - [geomPdf(](https://calc89.com/commands/geompdf/): `geomPdf(p, XVal)`. Returns the geometric probability that the first success occurs on a given trial. Example: `geomPdf(1/2,3)` → `1/8` - [invBinom(⁺](https://calc89.com/commands/invbinom/): `invBinom(CumulativeProb, NumTrials, Prob[, OutputForm])`. Inverse cumulative binomial distribution: finds the number of successes at which the cumulative probability reaches a given value. Example: `invBinom(0.77,30,1/6,1)` → `[[5,0.61644701469][6,0.7765371239]]` - [invBinomN(⁺](https://calc89.com/commands/invbinomn/): `invBinomN(CumulativeProb, Prob, NumSuccess[, OutputForm])`. Finds the number of trials at which the cumulative binomial probability for a given number of successes reaches a given value. Example: `invBinomN(0.01,0.7,49,1)` → `[[85,0.0104507566907][86,0.00709005432826]]` - [invChi2(](https://calc89.com/commands/invchi2/): `invChi2(Area, df)`. Inverse χ² distribution: returns the value with a given area to its left. Example: `invChi2(0.95,2)` → `5.99146454711` - [invF(](https://calc89.com/commands/invf/): `invF(Area, dfNumer, dfDenom)`. Inverse F distribution: returns the value with a given area to its left. Example: `invF(0.95,5,10)` → `3.32583453041` - [invNorm(](https://calc89.com/commands/invnorm/): `invNorm(Area[, μ[, σ]])`. Inverse normal distribution: returns the value with a given area to its left. It gives critical values such as 1.96 for 95 percent. Example: `invNorm(0.975)` → `1.95996398454` - [invt(](https://calc89.com/commands/invt/): `invt(Area, df)`. Inverse Student t distribution: returns the value with a given area to its left, used for t critical values. Example: `invt(0.975,10)` → `2.22813885199` - [normCdf(](https://calc89.com/commands/normcdf/): `normCdf(LowBound, UpBound[, μ[, σ]])`. Returns the probability that a normally distributed value lies between two bounds. Example: `normCdf(-1,1)` → `0.682689492137` - [normPdf(](https://calc89.com/commands/normpdf/): `normPdf(XVal[, μ[, σ]])`. Returns the probability density of the normal distribution at a value. Example: `normPdf(0)` → `0.398942280401` - [poissCdf(](https://calc89.com/commands/poisscdf/): `poissCdf(λ[, LowBound], UpBound)`. Returns the cumulative Poisson probability for a range of counts. Example: `poissCdf(2,0,3)` → `19/(3·ℯ^2)` - [poissPdf(](https://calc89.com/commands/poisspdf/): `poissPdf(λ, XVal)`. Returns the Poisson probability of exactly a given count. Example: `poissPdf(2,1)` → `2/ℯ^2` - [tCdf(](https://calc89.com/commands/tcdf/): `tCdf(LowBound, UpBound, df)`. Returns the Student t distribution probability between two bounds. Example: `tCdf(-2,2,10)` → `0.926611965229` - [tPdf(](https://calc89.com/commands/tpdf/): `tPdf(XVal, df)`. Returns the probability density of the Student t distribution at a value. Example: `tPdf(0,5)` → `0.379606689822` ## Statistics - [ANOVA](https://calc89.com/commands/anova/): `ANOVA List1,List2[,List3,…,List20]`. Performs a one way analysis of variance to compare the means of several groups. The results are stored in stat variables such as stat.F. Example: `ANOVA {1,2,3},{4,5,6},{7,8,10}:stat.F` → `20.8461538462` - [ANOVA2way](https://calc89.com/commands/anova2way/): `ANOVA2way List1,List2[,List3,…,List10][,LevRow]`. Performs a two way analysis of variance on several lists of data. The results are stored in stat variables such as stat.F. Example: `ANOVA2way {1,2,3},{4,5,6},{7,8,10}:stat.F` → `271.0` - [chi22way](https://calc89.com/commands/chi22way/): `chi22way obsMatrix`. Performs a χ² test for association on a two way table of observed counts. The results are stored in stat variables such as stat.PVal. Example: `chi22way [10,20;30,40]:stat.df` → `1.0` - [chi2GOF](https://calc89.com/commands/chi2gof/): `chi2GOF obsList,expList,df`. Performs a χ² goodness of fit test that compares observed counts with expected counts. The results are stored in stat variables such as stat.PVal. Example: `chi2GOF {10,20,30},{20,20,20},2:stat.PVal` → `0.00673794699909` - [CubicReg](https://calc89.com/commands/cubicreg/): `CubicReg X,Y[,[Freq][,Category,Include]]`. Fits a cubic polynomial y=a·x^3+b·x^2+c·x+d to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `CubicReg {0,1,2,3,4},{0,1,8,27,64}:stat.RegEqn` → `1.0·x^3` - [ExpReg](https://calc89.com/commands/expreg/): `ExpReg X,Y[,[Freq][,Category,Include]]`. Fits an exponential model y=a·b^x to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `ExpReg {0,1,2,3},{3,6,12,24}:stat.RegEqn` → `3.0·2.0^x` - [FTest_2Samp⁺](https://calc89.com/commands/ftest-2samp/): `FTest_2Samp List1,List2[,Freq1[,Freq2[,Hypoth]]]`. Performs a two sample F test that compares the variances of two populations. The results are stored in stat variables such as stat.F. Example: `FTest_2Samp 2,8,3,8,0:stat.F` → `0.444444444444` - [LinRegBx⁺](https://calc89.com/commands/linregbx/): `LinRegBx X,Y[,[Freq][,Category,Include]]`. Fits a line y=a+b·x to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `LinRegBx {1,2,3,4},{2,4,5,9}:stat.RegEqn` → `2.2·x−0.5` - [LinRegMx⁺](https://calc89.com/commands/linregmx/): `LinRegMx X,Y[,[Freq][,Category,Include]]`. Fits a line y=m·x+b to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `LinRegMx {1,2,3,4},{2,4,5,9}:stat.RegEqn` → `2.2·x−0.5` - [LinRegtIntervals](https://calc89.com/commands/linregtintervals/): `LinRegtIntervals X,Y[,F[,0[,CLev]]]`. Computes confidence intervals for a linear regression, for the slope or for a predicted response. The results are stored in stat variables such as stat.CLower. Example: `LinRegtIntervals {1,2,3,4,5},{2,4,5,9,10},1,0,0.95:stat.CLower` → `1.29910190987` - [LinRegtTest](https://calc89.com/commands/linregttest/): `LinRegtTest X,Y[,Freq[,Hypoth]]`. Performs a t test on the slope of a linear regression and the correlation of the data. The results are stored in stat variables such as stat.t. Example: `LinRegtTest {1,2,3,4,5},{2,4,5,9,10}:stat.t` → `8.34455384951` - [LnReg](https://calc89.com/commands/lnreg/): `LnReg X,Y[,[Freq][,Category,Include]]`. Fits a logarithmic model y=a+b·ln(x) to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `LnReg {1,2,3,4},{0,0.69,1.1,1.39}:stat.b` → `1.00270607399` - [Logistic](https://calc89.com/commands/logistic/): `Logistic X,Y[,[Freq][,Category,Include]]`. Fits a logistic growth model y=c/(1+a·ℯ^(−b·x)) to data. The results are stored in stat variables such as stat.c. Example: `Logistic {0,1,2,3,4,5},{1,2,4,6,7,7.5}:stat.c` → `7.78954768529` - [LogisticD⁺](https://calc89.com/commands/logisticd/): `LogisticD X,Y[,[Iterations],[Freq][,Category,Include]]`. Fits a logistic model with an added constant d to data. The results are stored in stat variables such as stat.d. Example: `LogisticD {0,1,2,3,4,5},{2,3,5,7,8,8.5}:stat.d` → `1.44020478601` - [mean(](https://calc89.com/commands/mean/): `mean(List[, FreqList])`. Returns the arithmetic mean of the elements of a list. Example: `mean({1,2,3,4})` → `5/2` - [median(](https://calc89.com/commands/median/): `median(List[, FreqList])`. Returns the median of the elements of a list. Example: `median({3,1,2})` → `2` - [MedMed](https://calc89.com/commands/medmed/): `MedMed X,Y[,Freq][,Category,Include]`. Fits a median median line to data, a line that is resistant to outliers. The results are stored in stat variables such as stat.RegEqn. Example: `MedMed {1,2,3,4,5,6},{2,4,5,9,10,13}:stat.RegEqn` → `2.125·x−0.270833333333` - [MultReg](https://calc89.com/commands/multreg/): `MultReg Y,X1[,X2[,X3,…[,X10]]]`. Performs a multiple linear regression of one y list on several x lists. The results are stored in stat variables such as stat.b1. Example: `MultReg {3,5,7,10},{1,2,3,4},{2,1,4,3}:stat.b1` → `2.375` - [MultRegIntervals](https://calc89.com/commands/multregintervals/): `MultRegIntervals Y,X1[,X2[,X3,…[,X10]]],XValList[,CLevel]`. Computes a confidence interval for a predicted value from a multiple linear regression. The results are stored in stat variables such as stat.ME. Example: `MultRegIntervals {3,5,7,10,12},{1,2,3,4,5},{2,1,4,3,5},{3,3},0.95:stat.ME` → `0.687826586507` - [MultRegTests](https://calc89.com/commands/multregtests/): `MultRegTests Y,X1[,X2[,X3,…[,X10]]]`. Performs the F test and t tests of a multiple linear regression. The results are stored in stat variables such as stat.F. Example: `MultRegTests {3,5,7,10,12},{1,2,3,4,5},{2,1,4,3,5}:stat.F` → `207.173913043` - [OneVar](https://calc89.com/commands/onevar/): `OneVar [1,]X[,[Freq][,Category,Include]]`. Computes one variable statistics of a list, such as mean, standard deviation and quartiles. The results are stored in stat variables such as stat.sx. Example: `OneVar {1,2,3,4}:stat.sx` → `1.29099444874` - [PowerReg](https://calc89.com/commands/powerreg/): `PowerReg X,Y[,Freq][,Category,Include]`. Fits a power model y=a·x^b to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `PowerReg {1,2,3,4},{2,8,18,32}:stat.RegEqn` → `2.0·x^2.0` - [QuadReg](https://calc89.com/commands/quadreg/): `QuadReg X,Y[,Freq][,Category,Include]`. Fits a quadratic y=a·x^2+b·x+c to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `QuadReg {0,1,2,3},{1,2,5,10}:stat.RegEqn` → `1.0·x^2+1.0` - [QuartReg](https://calc89.com/commands/quartreg/): `QuartReg X,Y[,Freq][,Category,Include]`. Fits a quartic polynomial y=a·x^4+b·x^3+c·x^2+d·x+e to data with least squares regression. The results are stored in stat variables such as stat.RegEqn. Example: `QuartReg {0,1,2,3,4,5},{0,1,16,81,256,625}:stat.RegEqn` → `1.0·x^4` - [SinReg](https://calc89.com/commands/sinreg/): `SinReg X,Y[,[Iterations],[Period][,Category,Include]]`. Fits a sinusoidal model y=a·sin(b·x+c)+d to data. The results are stored in stat variables such as stat.RegEqn. Example: `SinReg {0,1,2,3,4,5,6,7},{0,0.84,0.91,0.14,-0.76,-0.96,-0.28,0.66}:stat.b` → `1.0003577369` - [stDevPop(](https://calc89.com/commands/stdevpop/): `stDevPop(List[, FreqList])`. Returns the population standard deviation of a list. Example: `stDevPop({1,2,3,4})` → `√(5)/2` - [stDevSamp(⁺](https://calc89.com/commands/stdevsamp/): `stDevSamp(List[, FreqList])`. Returns the sample standard deviation of a list. Example: `stDevSamp({1,2,3,4})` → `√(15)/3` - [tInterval](https://calc89.com/commands/tinterval/): `tInterval List[,Freq[,CLevel]]`. Computes a t confidence interval for a population mean when σ is unknown. The results are stored in stat variables such as stat.CUpper. Example: `tInterval 48.6,1.8,9,0.95:stat.CUpper` → `49.9836024811` - [tInterval_2Samp⁺](https://calc89.com/commands/tinterval-2samp/): `tInterval_2Samp List1,List2[,Freq1[,Freq2[,CLevel[,Pooled]]]]`. Computes a t confidence interval for the difference of two population means. The results are stored in stat variables such as stat.ME. Example: `tInterval_2Samp 5,2,8,4,2,8,0.95,1:stat.ME` → `2.14478668792` - [tTest](https://calc89.com/commands/ttest/): `tTest μ0,List[,Freq[,Hypoth]]`. Performs a one sample t test on a population mean when σ is unknown. The results are stored in stat variables such as stat.PVal. Example: `tTest 50,48.6,1.8,9,0:stat.PVal` → `0.04791172613` - [tTest_2Samp⁺](https://calc89.com/commands/ttest-2samp/): `tTest_2Samp List1,List2[,Freq1[,Freq2[,Hypoth[,Pooled]]]]`. Performs a two sample t test on the difference of two population means. The results are stored in stat variables such as stat.t. Example: `tTest_2Samp 5,2,8,4,2,8,0,1:stat.t` → `1.0` - [TwoVar](https://calc89.com/commands/twovar/): `TwoVar X, Y[, [Freq][, Category, Include]]`. Computes two variable statistics of paired data, such as means, sums and the correlation. The results are stored in stat variables such as stat.r. Example: `TwoVar {1,2,3,4},{2,4,5,9}:stat.r` → `0.964763821238` - [varPop(](https://calc89.com/commands/varpop/): `varPop(List[, FreqList])`. Returns the population variance of a list. Example: `varPop({1,2,3,4})` → `5/4` - [varSamp(⁺](https://calc89.com/commands/varsamp/): `varSamp(List[, FreqList])`. Returns the sample variance of a list. Example: `varSamp({1,2,3,4})` → `5/3` - [zInterval](https://calc89.com/commands/zinterval/): `zInterval σ,List[,Freq[,CLevel]]`. Computes a z confidence interval for a population mean when σ is known. The results are stored in stat variables such as stat.CLower. Example: `zInterval 1.8,48.6,9,0.95:stat.CLower` → `47.4240216093` - [zInterval_1Prop⁺](https://calc89.com/commands/zinterval-1prop/): `zInterval_1Prop x,n[,CLevel]`. Computes a z confidence interval for a population proportion. The results are stored in stat variables such as stat.CLower. Example: `zInterval_1Prop 12,40,0.95:stat.CLower` → `0.157987117455` - [zInterval_2Prop⁺](https://calc89.com/commands/zinterval-2prop/): `zInterval_2Prop x1,n1,x2,n2[,CLevel]`. Computes a z confidence interval for the difference of two proportions. The results are stored in stat variables such as stat.CUpper. Example: `zInterval_2Prop 12,40,15,40,0.95:stat.CUpper` → `0.131582202975` - [zInterval_2Samp⁺](https://calc89.com/commands/zinterval-2samp/): `zInterval_2Samp σ1,σ2,List1,List2[,Freq1[,Freq2,[CLevel]]]`. Computes a z confidence interval for the difference of two population means with known σ. The results are stored in stat variables such as stat.ME. Example: `zInterval_2Samp 2,2,5,8,4,8,0.95:stat.ME` → `1.95996398454` - [zTest](https://calc89.com/commands/ztest/): `zTest μ0,σ,List[,Freq[,Hypoth]]`. Performs a one sample z test on a population mean when σ is known. The results are stored in stat variables such as stat.PVal. Example: `zTest 50,1.8,48.6,9,0:stat.PVal` → `0.0196306572573` - [zTest_1Prop⁺](https://calc89.com/commands/ztest-1prop/): `zTest_1Prop p0,x,n[,Hypoth]`. Performs a one proportion z test. The results are stored in stat variables such as stat.z. Example: `zTest_1Prop 0.5,12,40,0:stat.z` → `−2.52982212813` - [zTest_2Prop⁺](https://calc89.com/commands/ztest-2prop/): `zTest_2Prop x1,n1,x2,n2[,Hypoth]`. Performs a two proportion z test that compares two population proportions. The results are stored in stat variables such as stat.z. Example: `zTest_2Prop 12,40,15,40,0:stat.z` → `−0.709326902132` - [zTest_2Samp⁺](https://calc89.com/commands/ztest-2samp/): `zTest_2Samp σ1,σ2,List1,List2[,Freq1[,Freq2[,Hypoth]]]`. Performs a two sample z test on the difference of two population means with known σ. The results are stored in stat variables such as stat.z. Example: `zTest_2Samp 2,2,5,8,4,8,1:stat.z` → `1.0` - [χ²2way⁺](https://calc89.com/commands/chi-square-2way/): `χ²2way obsMatrix`. Performs a χ² test for association on a two way table of observed counts; it is the same command as chi22way. The results are stored in stat variables such as stat.PVal. Example: `χ²2way [10,20;30,40]:stat.df` → `1.0` - [χ²GOF⁺](https://calc89.com/commands/chi-square-gof/): `χ²GOF obsList,expList,df`. Performs a χ² goodness of fit test that compares observed counts with expected counts; it is the same command as chi2GOF. The results are stored in stat variables such as stat.PVal. Example: `χ²GOF {10,20,30},{20,20,20},2:stat.PVal` → `0.00673794699909` ## Finance - [amortTbl(⁺](https://calc89.com/commands/amorttbl/): `amortTbl(NPmt, N, I, PV[, Pmt[, FV[, PpY[, CpY[, PmtAt[, roundValue]]]]]])`. Returns an amortization table as a matrix, with payment number, interest, principal and balance for each payment. Example: `amortTbl(1,12,6,1200,,,12,12)` → `[[0,0.0,0.0,1200.0][1,−6.0,−97.28,1102.72]]` - [bal(](https://calc89.com/commands/bal/): `bal(NPmt, N, I, PV[, Pmt[, FV[, PpY[, CpY[, PmtAt[, roundValue]]]]]])`. Returns the remaining loan balance after a given payment. Example: `bal(5,6,5.75,5000,,12,12)` → `833.11` - [dbd(](https://calc89.com/commands/dbd/): `dbd(date1, date2)`. Returns the number of days between two dates. Example: `dbd(12.3103,1.0104)` → `1` - [eff(⁺](https://calc89.com/commands/eff/): `eff(nominalRate, CpY)`. Converts a nominal annual interest rate into the effective annual rate. Example: `eff(5.75,12)` → `5.90398312816` - [irr(](https://calc89.com/commands/irr/): `irr(CF0, CFList[, CFFreq])`. Returns the internal rate of return of a series of cash flows, the rate at which the net present value is zero. Example: `irr(5000,{6000,-8000,2000,-3000},{2,2,2,1})` → `−4.64483671742` - [mirr(⁺](https://calc89.com/commands/mirr/): `mirr(financeRate, reinvestRate, CF0, CFList[, CFFreq])`. Returns the modified internal rate of return, which uses separate finance and reinvestment rates. Example: `mirr(4.65,12,5000,{6000,-8000,2000,-3000},{2,2,2,1})` → `13.41608607` - [nom(⁺](https://calc89.com/commands/nom/): `nom(effectiveRate, CpY)`. Converts an effective annual interest rate into the nominal annual rate. Example: `nom(5.90398,12)` → `5.74999703208` - [npv(](https://calc89.com/commands/npv/): `npv(InterestRate, CF0, CFList[, CFFreq])`. Returns the net present value of a series of cash flows at a given interest rate. Example: `npv(10,5000,{6000,-8000,2000,-3000},{2,2,2,1})` → `4769.9132419` - [tvmFV(](https://calc89.com/commands/tvmfv/): `tvmFV(N, I, PV, Pmt[, PpY[, CpY[, PmtAt]]])`. Time value of money: returns the future value of a loan or savings plan. Example: `tvmFV(120,5,0,-500,12,12)` → `77641.1397228` - [tvmI(](https://calc89.com/commands/tvmi/): `tvmI(N, PV, Pmt, FV[, PpY[, CpY[, PmtAt]]])`. Time value of money: returns the annual interest rate in percent. Example: `tvmI(240,100000,-1000,0,12,12)` → `10.5241108726` - [tvmN(](https://calc89.com/commands/tvmn/): `tvmN(I, PV, Pmt, FV[, PpY[, CpY[, PmtAt]]])`. Time value of money: returns the number of payment periods. Example: `tvmN(5,0,-500,77641,12,12)` → `119.999829978` - [tvmPmt(](https://calc89.com/commands/tvmpmt/): `tvmPmt(N, I, PV, FV[, PpY[, CpY[, PmtAt]]])`. Time value of money: returns the payment per period, for example a monthly loan payment. Example: `tvmPmt(60,4,30000,0,12,12)` → `−552.495661658` - [tvmPV(](https://calc89.com/commands/tvmpv/): `tvmPV(N, I, Pmt, FV[, PpY[, CpY[, PmtAt]]])`. Time value of money: returns the present value of a loan or savings plan. Example: `tvmPV(48,4,-500,30000,12,12)` → `−3426.69967714` - [ΣInt(](https://calc89.com/commands/sigma-int/): `ΣInt(NPmt1, NPmt2, N, I, PV[, Pmt[, FV[, PpY[, CpY[, PmtAt[, roundValue]]]]]])`. Returns the total interest paid over a range of loan payments. Example: `ΣInt(1,3,12,4.75,20000,,12,12)` → `−213.48` - [ΣPrn(](https://calc89.com/commands/sigma-prn/): `ΣPrn(NPmt1, NPmt2, N, I, PV[, Pmt[, FV[, PpY[, CpY[, PmtAt[, roundValue]]]]]])`. Returns the total principal paid over a range of loan payments. Example: `ΣPrn(1,3,12,4.75,20000,,12,12)` → `−4916.28` ## Strings - [&](https://calc89.com/commands/ampersand/): `String1 & String2`. Joins two strings into one. Example: `"ab"&"cd"` → `"abcd"` - [expr(](https://calc89.com/commands/expr/): `expr(String)`. Evaluates the expression contained in a string and returns its result. Example: `expr("1+2")` → `3` - [mid(](https://calc89.com/commands/mid/): `mid(String or List, Start[, Count])`. Returns a part of a string or list, starting at a given position. Example: `mid({1,2,3,4,5},2,3)` → `{2,3,4}` - [string(](https://calc89.com/commands/string/): `string(Expr)`. Simplifies an expression and returns the result as a string. Example: `string(2*x+x)` → `"3·x"`