The calculator that keeps its working CALC
A tape calculator: every line stays, every line can be edited, and everything below it works itself out again. The arithmetic is decimal, so a column of pennies adds up to pennies.
The tape
Change a line and everything below works itself out again. Enter starts a new line; # starts a note.
- Running total
- 0
What it understands
Every one of these puts itself on the tape if you press it.
Money that does not drift
Addition and subtraction keep the decimal places you typed, so a column of pennies adds up to pennies.
Percentages the way people say them
A percentage after a plus or a minus is a percentage of the thing on the left.
Lines with names
Name a line and use the name below it. Named lines stay out of the running total.
Units
Length, mass, volume, temperature, data and time. The word to converts whatever the line has worked out so far.
How it works
CALC is a tape calculator that keeps its working. The arithmetic is decimal, so 0.1 plus 0.2 comes out as 0.3 rather than the long string most calculators show. Use one line's answer in another, keep a running total, and see exactly what 120 plus 15 per cent does. It runs in your browser.
Questions people ask about CALC
Why does 0.1 + 0.2 come out wrong everywhere else?
Because computers hold fractions in binary, and 0.1 in binary is a recurring fraction in the same way a third is in decimal. It gets cut off at 53 bits, so the stored number is very slightly more than a tenth, and adding two of those shows the error at the seventeenth digit. Money arithmetic done that way drifts by a penny over enough lines and nobody can see where the penny went. This page never converts your figures to binary at all.
How do I use one line’s answer in another?
Name it. Write subtotal = 120 * 3 and then use subtotal anywhere below that line. Names are one word of letters, digits and underscores. There is also prev, which is whatever the line directly above worked out, for when naming it would be more ceremony than it is worth. A name is allowed to be the same word as a unit, because a line called days or hours is a far more ordinary thing to want than the word days spelled out as a unit; the name wins from that line down, and any line that then tries to use it as a unit says so.
What goes into the running total?
Every line that is a plain number and has not been given a name. That is the rule that makes a tape usable: your working lines get names and stay out of the total, and the lines you actually want added up are the bare ones. A line with a unit on it is left out too, since adding kilograms to gigabytes would be a nonsense.
What does 120 + 15% actually do?
It gives 138. The percentage is taken of the number on the left, which is what a person means when they say add fifteen percent, and what a pocket calculator with a % key does. 120 - 15% is 102 for the same reason. On its own, 15% is 0.15.
Why will it not add 20 C to 30 C?
Because a temperature in Celsius or Fahrenheit is a point on a scale rather than an amount of something, so adding two of them is meaningless in a way that adding two lengths is not. Twenty degrees plus thirty degrees is not fifty degrees of anything. Conversion between the three scales works normally.
Is anything sent anywhere?
No. The page loads its own script and nothing else, works with the network switched off, and keeps the tape in this browser’s local storage under one key. Clear the tape, or clear the site’s data in your browser, and it is gone.
Can I keep a tape for each job?
Not in one page: there is one tape, kept where you left it. Copy a finished tape out with the copy button and paste it wherever the working belongs, which is usually the thing you were going to have to do anyway.
How do I move between lines on the tape?
Enter starts a new line. The up and down arrows move between lines, and backspace on an empty line takes it away. Every line is an expression you can go back to: change one and everything below it works itself out again.
Which units does it know?
Length: mm cm m km in ft yd mi nmi um nm. Mass: mg g kg t oz lb st ton longton. Volume: ml cl dl l m3 cm3 tsp tbsp floz cup pt qt gal impfloz imppt impgal. Temperature: C F K. Data: bit B kB MB GB TB PB KiB MiB GiB TiB kbit Mbit Gbit. Time: ms s min h d wk mo yr.
Long spellings work too: inches, kilograms, minutes. The word to converts whatever the line has worked out so far, as in 2 m + 30 cm to mm.
How can I write a number?
As 1,234.50 or as 1.2345e3. A minus sign, a multiplication sign or a space pasted out of a document is read as the character you meant. A comma has to group in threes: 1,5 is refused rather than read as fifteen.
Can I put a note on the tape?
Yes. A line beginning with # is a note. It stays on the tape and is not worked out.
Doing this often? OBSCURA Pro saves the calculations you keep here, along with the result of every other tool outside the Workspace, and includes the paid applications. Everything is US$5 a month or US$48 a year.