Basics
Your first calculation, variables, notes, and how numbers work.
OtterCalc is a notepad that does math. Type a calculation on any line and the answer appears on the right, instantly. There is no equals button and no cell references to learn. Try changing a number in any example on this page: they are all live.
Variables
Give a value a name with the = sign, then use that name anywhere below. Names can be several words long, spaces included, and capitalization does not matter. Both directions work: name = expression, or expression = name when the result comes first in your head.
Redefining a variable
You can give the same name a new value further down. Lines below the new value use it; lines above keep the old one. This works like reading a page from top to bottom.
Headings, labels and comments
Give a document structure without leaving the keyboard. Start a line with # for a heading (## for a smaller one); it renders bold and shows no result. Put a label before a colon, like Rent: $2,500, and the label is bold while the amount still calculates. Lines starting with // are comments (dimmed, ignored), and you can add // to the end of a calculation too. Any other non-math line is plain text, and a blank line or a heading also starts a new section for totals and charts. One label is special: result: (or answer:) marks the page's answer, and the editor sets that line and its value large.
Words next to numbers
Labels that sit right next to a number are ignored in the math, so you can annotate as you go. This only happens when the line is clearly a calculation. A misspelled variable name is never silently ignored: you get a clear error instead of a wrong answer. While you are still typing, a half-finished line like 5 + or 2 * (3 stays calm and shows a partial result rather than flashing an error at you.
How to write numbers
Use a dot for decimals: 1234.56, or lead with the dot for values below one, so .5 means 0.5. To group big numbers, a comma, an underscore, an apostrophe, or a plain space all work: 1,000,000 and 1_000_000 and 1 000 000 are the same million. Shortcuts: 45k, 1.5M, 2B, words like 2 million (Spanish uses the long scale: 1 billón is a million millions), and scientific input like 1e5. Results display in your own language format. In the Spanish and French interface you can also write numbers your way: 1.200,50 and 5,5% read as a Spanish or French reader expects (a dot followed by three digits is a group, a comma is the decimal), while 1.5 stays a decimal. English-style numbers mean the same thing in every language; the Spanish and French forms are read by whoever opens the document in their own interface language, so prefer the dot style in documents you share across languages. For hex, binary and octal bases, bitwise math, and scientific-notation output, see Advanced.
Rounding, in plain words
Ask for the rounding you mean: rounded, rounded up, rounded down, to 2 dp for decimal places, or to nearest 10 for tidy steps. It works on money too, and the unit stays.
Words work as operators too
Write math the way you say it: plus, minus, times, divided by, to the power of. A lone x between two numbers multiplies too, so 12 x 3 is 36. The rule of three answers proportion questions directly.
Functions and precision
Functions: sqrt, cbrt, abs, round, floor, ceil, min, max, sum, mean, median, gcd, lcm, factorial (or write 5!), and the trig and log family (sin, cos, tan, log, ln) when called with parentheses. log is base 10 and ln is the natural log. Constants pi and e. Square and curly brackets group exactly like parentheses, so [2 + 3] * {4 - 1} is 15 and you can nest them any way you like. All math runs at 64 digits of precision, so 0.1 + 0.2 is exactly 0.3.