Function Reference

All built-in functions available in instacalc expressions.

Math Functions

FunctionExampleResultDescription
sqrt(x)sqrt(144)12Square root
abs(x)abs(-42)42Absolute value
round(x)round(3.7)4Round to nearest integer
round(x, n)round(3.14159, 2)3.14Round to n decimal places
floor(x)floor(3.7)3Round down
ceil(x)ceil(3.2)4Round up
log(x)log(100)2Base-10 logarithm
ln(x)ln(2.718)1Natural logarithm
min(...)min(10, 25, 3)3Smallest value
max(...)max(10, 25, 3)25Largest value
pow(x, y)pow(2, 10)1024x raised to the y power

Trigonometry

FunctionDescription
sin(x)Sine (x in radians)
cos(x)Cosine
tan(x)Tangent
asin(x)Inverse sine
acos(x)Inverse cosine
atan(x)Inverse tangent

Financial Functions

FunctionExampleDescription
pmt(rate, n, pv)pmt(6.5%/12, 360, 400000)Monthly payment on a loan
fv(rate, n, pmt)fv(7%/12, 360, 500)Future value of periodic payments
pv(rate, n, pmt)pv(5%/12, 120, 1000)Present value of periodic payments

Constants

NameValueDescription
pi3.14159...Ratio of circumference to diameter
e2.71828...Euler’s number

Shortcuts

SyntaxMeaningExample
%Percentage200 + 15% = 230
$Dollar formatting$2.5m = 2,500,000
kThousands450k = 450,000
mMillions$1.2m = 1,200,000
//Commenttotal // grand total