Skip to content
kitty/binMath
Your notebooks stay on this device

A calculator that remembers every sum

Each calculation stays on its own line with the answer beside it, so you can scroll back, fix a number and watch the results below update. Your history is saved in this browser and never uploaded.

Saved on this device

    Enter starts a new line, ↑ ↓ move between lines, Alt with an arrow moves a line, Ctrl Z undoes and Ctrl Enter copies the answer. Click any answer to copy it.

    How it works

    Each line is a calculation, and its answer is shown on the right the moment you type it, like the tape on an adding machine. Change a number near the top and every line below that depends on it updates straight away. Lines that start with # and a space become headings, plain words become notes, and anything after // is a comment, so a notebook can explain itself.

    Fractions stay exact where they can, so 1/3 + 1/4 gives 7/12 and 0.1 + 0.2 gives exactly 0.3. Very large whole numbers such as 25! or 2^100 are shown in full.

    Variables, references and totals

    Write rent = 1450 to name a value, then use the name anywhere below, as in rent * 12. ans is the answer on the line above, #3 or line 3 is the answer on line 3, and total adds up every answer since the last heading or blank line. You can also define your own functions, such as f(x) = x^2 + 1, and a label before a colon, as in Rent: 1450, is shown but left out of the maths.

    Units and conversions

    Put a unit after a number and the notebook keeps track of it: 5 km in miles, 72 F to C, 3 hours 20 min in minutes, 500 sq ft in m2 or 2 GB in MiB. Units combine as you would expect, so 10 km / 2 h is a speed and 25 GB / 120 Mbps is how long a download takes. Length, area, volume, mass, temperature, speed, time, data size, data rate, energy, power, pressure and fuel economy are all covered. Currency is not, because that would need live exchange rates from the internet.

    Statistics on lists

    A line like sales = 120, 340, 290, 410, 380 stores a list. Use it with mean, median, mode, stdev and variance for samples, stdevp and varp for whole populations, plus sum, min, max, count, range, quartiles and percentile(sales, 90). Arithmetic works on every value at once, so sales * 1.2 raises them all by a fifth. To bring in a column from a spreadsheet, choose Paste a column and the numbers arrive as a named list.

    Plots, charts and equations

    plot sin(x) from -pi to pi draws a function, and up to four functions can share one plot when you separate them with commas. Plots always use radians. Move the pointer over a plot to read values, and the line under it lists where the curve crosses zero. chart sales draws a list as a bar chart, and adding as line, as area or as pie changes the style. Type solve 2x + 3 = 11, or simply an equation such as x^2 - 5x + 6 = 0, and the exact solutions appear on the right. Matrices work too, with det [1 2; 3 4], inverse, transpose and rank.

    Keeping and sharing notebooks

    Notebooks save themselves on this device as you type, and you can keep as many as you like and switch between them from the Notebooks list. Copy a single answer by clicking it, copy the whole notebook as text or as a Markdown table, or download it as a text file that anyone can read. The notebook file keeps everything exactly so you can open it here again on another computer.

    Keyboard shortcuts

    • Enter starts a new line, or splits the line at the cursor
    • ↑ and ↓ move between lines, and with Alt they move the line itself
    • Backspace at the start of a line joins it to the line above
    • Ctrl Z undoes, Ctrl Shift Z or Ctrl Y redoes
    • Ctrl Enter copies the answer on the current line

    Privacy

    Every calculation happens in your browser. Notebooks are kept in this browser’s storage on this device and are never sent anywhere. Clearing your browser data removes them, so download a notebook file to keep a copy.

    Questions

    Why is my answer different from my phone calculator?

    Check the angle setting first: Deg and Rad change what sin, cos and tan mean. Also, 2^3^2 is worked out from the right, giving 512, and -3^2 is −9, the way most scientific calculators and textbooks read them.

    How precise is it?

    Whole numbers and fractions are exact. Everything else uses the double precision numbers built into your browser, about 15 significant digits, and answers are rounded to 12 digits so tiny rounding errors stay out of sight. Unit results are shown to 7 significant digits.

    What can’t it do?

    It doesn’t do currency, dates or symbolic algebra such as simplifying or factoring expressions. Equations are solved as typed, without using the notebook’s variables.

    Paste a column

    Paste numbers from a spreadsheet, a CSV file or any text. Each numeric column becomes a named list.

    Delete this notebook?

    more in the bin

    Keep going.

    More in kittybin Math

    Explore the bin