Function Reference
All built-in functions available in instacalc expressions.
Math Functions
| Function | Example | Result | Description |
|---|
sqrt(x) | sqrt(144) | 12 | Square root |
abs(x) | abs(-42) | 42 | Absolute value |
round(x) | round(3.7) | 4 | Round to nearest integer |
round(x, n) | round(3.14159, 2) | 3.14 | Round to n decimal places |
floor(x) | floor(3.7) | 3 | Round down |
ceil(x) | ceil(3.2) | 4 | Round up |
log(x) | log(100) | 2 | Base-10 logarithm |
ln(x) | ln(2.718) | 1 | Natural logarithm |
min(...) | min(10, 25, 3) | 3 | Smallest value |
max(...) | max(10, 25, 3) | 25 | Largest value |
pow(x, y) | pow(2, 10) | 1024 | x raised to the y power |
Trigonometry
| Function | Description |
|---|
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
| Function | Example | Description |
|---|
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
| Name | Value | Description |
|---|
pi | 3.14159... | Ratio of circumference to diameter |
e | 2.71828... | Euler’s number |
Shortcuts
| Syntax | Meaning | Example |
|---|
% | Percentage | 200 + 15% = 230 |
$ | Dollar formatting | $2.5m = 2,500,000 |
k | Thousands | 450k = 450,000 |
m | Millions | $1.2m = 1,200,000 |
// | Comment | total // grand total |