Math & numbers · Notebook

Advanced
calculator

Write your working line by line, name results and reuse them, solve equations, plot curves and take derivatives or integrals — all computed in the page, with nothing sent anywhere.

Variables & multi-lineSolve · plot · calculusNo external libraries
Notebookvariables · solve · plot
One expression per line. Assign with =, then reuse the name. Try solve, plot, d/dx or integral.

A calculator that remembers what you just worked out

Most calculators forget everything the moment you press equals. This one keeps your working on screen: write a line, name the result, and use that name further down. It is closer to a sheet of paper than a keypad — which is exactly what you want when a problem takes more than one step.

Assign and reuse
r = 4
area = pi * r^2
area / 2 → 25.13

What it understands

Standard arithmetic with correct precedence, powers with ^ (right-associative, so 2^3^2 is 512, not 64), factorials with !, and a full function library: sqrt, cbrt, exp, ln, log, log2, the trigonometric and hyperbolic families with their inverses, abs, sign, round, floor, ceil, min, max, hypot, pow, mod, nCr and nPr. The constants pi, e and tau are built in.

Four commands
solve x^2 - 4 → roots of an equation
plot sin(x) → draws the curve
d/dx x^3 at 2 → slope at a point
integral x^2 from 0 to 3 → area under the curve

How the answers are worked out

Roots are found numerically: the tool scans the range for sign changes, then bisects each one to about ten decimal places. Derivatives use a central difference, and integrals use Simpson's rule over two thousand slices. That means results are accurate to many decimal places for well-behaved functions, but they are numerical approximations rather than exact symbolic algebra — solve will find that x² = 2 has roots near ±1.41421356, not that they are exactly ±√2.

Why there is no third-party maths library

Everything here is parsed by hand: the text becomes tokens, the tokens become a queue in reverse Polish order, and that queue is evaluated. Nothing is ever handed to the browser as code to run, which is why an input like alert(1) is simply rejected as an unknown name rather than doing anything. It also means the page loads no external scripts at all — the same as every other page on this site. If you want a single-answer keypad instead, the scientific calculator is the simpler tool, and the fraction calculator handles exact fractions.

Common questions

Advanced FAQ

Yes. Write a line like r = 4 and the name r is available on every line below it. You can build up a calculation in steps, which makes long problems much easier to check than a single running total.

It scans the range for places where the expression changes sign, then narrows each one by bisection to around ten decimal places. Write solve x^2 - 4 to find where an expression equals zero, or solve x^2 = 9 to solve an equation directly. It reports every root it finds in the range.

No. Answers are numerical, not symbolic. It will tell you a root is 1.41421356 rather than that it is exactly the square root of two, and it cannot simplify or factor an expression. For step-by-step algebra you want a computer algebra system; for fast accurate numbers, this is the quicker tool.

sqrt, cbrt, abs, sign, exp, ln, log, log2, sin, cos, tan and their inverses, sinh, cosh, tanh, round, floor, ceil, min, max, hypot, pow, mod, nCr, nPr and factorial with the exclamation mark. The constants pi, e and tau are built in.

It samples the expression across the visible range and draws what it finds, skipping points that are undefined or infinite. Curves with asymptotes, like tan(x) or 1/x, will show breaks where the function is undefined rather than drawing a false vertical line.