Scratchpad
Name your figures, write the working, and calculate when you’re ready.
Your working
Separate declarations with semicolons. End with an expression for a result. Enter starts a new line; Shift Enter calculates.
Result
Suffixed Abbreviate the result to the largest magnitude that fits: 2,500,000 reads as 2.5M. Named bindings keep their full figures.Your result will appear here after you calculate.
Named bindings
0 definedKeep track of the figures in your calculation.
rent = $1,850; gives a figure a name you can reuse.
Syntax & examples
Figures & names
$1,250.50, 2.5k, 3M, 1b, 1t
income = $1k;
tax rate = 0.25;
income * (1 - tax rate) Replace Input with this example and calculate.Names can contain spaces. A # starts
a comment.
Arithmetic & functions
+ - * / ^ % with () [] {} grouping. % means remainder; write 5%
as 0.05.
log lg ln sqrt abs floor ceil fact inv
Constants: e pi phi.
sqrt(3 ^ 2 + 4 ^ 2) Replace Input with this example and calculate.Sums & products
sum_i(i ^ 2, 1, 10) Replace Input with this example and calculate.prod_y(1.05, 1, 5) Replace Input with this example and calculate.Both bounds are inclusive whole numbers. The index belongs to the first argument. Use ungrouped figures for bounds.
Undefined arithmetic is shown as Undefined. Results use floating-point arithmetic.
Nested sums & products
Deposit $5,000 at the start of each of five years. Each deposit grows through the remaining years, with the rate rising from 3% by half a percentage point each year.
The sum’s local index t selects the deposit year and supplies the product’s starting bound. The
product’s local index y selects
each growth year and exists only inside that product’s first argument.
Result: 28,429.910985.
# Five deposits, each growing from its own year
deposit = $5k;
sum_t(
deposit * prod_y(1.03 + 0.005 * (y - 1), t, 5),
1, 5
) Replace Input with this example and calculate.