Simple Calculator

Basic arithmetic with expression display

Most four-function calculators show one number at a time. This one keeps the expression you are building on the upper line and the number you are currently typing on the lower one, so a receipt entered as 12.5 + 8.2 + 15.3 stays legible right up to the equals key. A fat-fingered 82 in the middle is visible as a wrong term rather than showing up later as a total that is 73.80 too high.

It also applies operator precedence. Type 3 + 5 × 2 here and the answer is 13. Type the same keys into a chain-entry desk or printing calculator and you get 16, because those machines commit the pending operation the moment you press the next operator. That single difference is why an adding-machine tape and a phone can disagree about the same column of figures.

Two things are deliberately missing from this keypad: memory registers (M+, MR, MC), and any entry longer than 15 digits. Parentheses are not one of them — they are simply one tab across. The Scientific keypad on this same page carries real ( and ) keys, so (3 + 5) × 2 can be typed straight through and returns 16. Staying on the Basic keypad, group terms the old way: compute the inner sum, press equals, and continue from the result.

The two-line display, and what each line is for

The upper line is the expression as entered, including every operator you have pressed. The lower line is the live entry: the digits currently being typed, or the result once you press equals. Pressing an operator moves the live entry up into the expression and clears the lower line for the next number, which is the moment to glance up and confirm the term you just committed.

The physical keyboard works throughout. Digits and the decimal point map directly; * is multiply and / is divide, since no keyboard carries a × or ÷ key; Enter evaluates and Backspace deletes the last character of the live entry. C clears everything, expression line included — there is no separate CE that clears only the current entry, so a mistyped number is fixed with Backspace, not with C.

Entries cap at 15 digits. That is partly a layout constraint and partly an honest one: an IEEE-754 double represents consecutive integers exactly only up to 2^53 = 9,007,199,254,740,992, a 16-digit number. Past 15 digits the display would be showing figures the arithmetic underneath cannot guarantee.

Precedence, and what the percent key actually does

Multiplication and division bind tighter than addition and subtraction, and within each of those two tiers the operations run strictly left to right. So 100 − 20 × 3 is 40, and 36 ÷ 6 × 2 is 12 rather than 3.

The percent key is not a percentage function. It divides the current entry by 100 in place, and that is all. This makes 80 × 15 % evaluate as 80 × 0.15 = 12, which is what most people want. It also makes 200 + 10 % evaluate as 200 + 0.1 = 200.1, which is almost never what people want. Certain business calculators special-case the addition form to mean "add 10 percent"; this one does not.

The practical consequence: to add a rate, multiply by 1 + rate. Sales tax at 8.5% is × 1.085. A 30% discount is × 0.7. A 12% markup on cost is × 1.12. For percent change between two figures, or for "A is what percent of B", use the Percentage Calculator, which has those as named modes.

Running a receipt through it, forwards and backwards

Three items at $12.50, $8.20 and $15.30, with sales tax at 8.5%:

  1. Press C, then enter 12.5 + 8.2 + 15.3. The expression line shows all three terms; press = for a subtotal of 36.00.
  2. With 36 still on the display, enter × 1.085 and press =. The total is 39.06.
  3. Splitting three ways: ÷ 3 = gives 13.02 each, which happens to land exactly on the cent.

Now the reverse, which is where people lose money. Given the $39.06 total and knowing tax was 8.5%, the subtotal is 39.06 ÷ 1.085 = 36.00. The tempting move is to take 8.5% off instead: 39.06 × 0.915 = 35.74. That is 26 cents low, because the 8.5% was charged on 36.00, not on 39.06. Adding a percentage and removing it are inverse operations only if you divide by the same factor you multiplied by.

Binary floating point, and why cents drift

Arithmetic runs in IEEE-754 double precision, the same format every browser and most languages use. Its significand is 53 bits, giving about 15.95 decimal digits of precision. One tenth has no exact binary representation, in the same way one third has no exact decimal one, so it is stored as the nearest representable value and the tiny errors survive every operation: internally, 0.1 + 0.2 is 0.30000000000000004. You will not see that here. The display rounds every result to 15 significant digits, so the screen reads 0.3 and the discrepancy sits one digit past the edge of what is printed. Hidden is not the same as absent.

For a bill split or a tax gross-up this never matters, because the error sits sixteen digits down. It matters when errors accumulate: totalling a few thousand currency amounts can land a cent away from a ledger that was kept in integer cents. Accounting systems avoid it by storing money as whole cents or in a decimal type, never as a float. If your figure has to reconcile exactly against a bank statement, reconcile in the accounting system and use this for the sanity check.

Precedence order, and the two ties everyone gets wrong

TierOperationsTie-break
1Grouped terms in brackets (Scientific keypad)Innermost first
2Exponents and rootsRight to left
3Multiplication and divisionLeft to right
4Addition and subtractionLeft to right

The mnemonic PEMDAS puts M before D and A before S, and that ordering is an artefact of the acronym, not of the mathematics. Multiplication does not outrank division, and addition does not outrank subtraction. Read as pairs, 8 ÷ 2 × 4 is 16 and 10 − 4 + 3 is 9. Read the acronym literally you get 1 and 3.

Exponents are the one tier that associates right to left: 2^3^2 is 2^9 = 512, not 8^2 = 64. That case needs the exponent key on the Scientific Calculator.

When this beats opening a spreadsheet

The break-even is repetition. A single throwaway sum — four receipt lines, a tax gross-up, a three-way split — is faster here than the time it takes a spreadsheet to open. The moment the same formula has to run down a column of thirty rows, or a number needs to change and everything downstream recompute, a spreadsheet wins outright, because this calculator has no cell references: change the third figure and you retype the whole expression.

It also keeps no record. Once you press C, the expression is gone, which is fine for a bill split and unacceptable for anything that has to be re-checked later. Amortisation, contribution schedules and anything with a repeated period belong in the Loan Calculator or a spreadsheet rather than in 360 manual multiplications here.

Frequently asked questions

Why does 200 + 10 % give 200.1 instead of 220?

The percent key divides the current entry by 100 and nothing else, so 10 becomes 0.1 before the addition runs. To add ten percent, multiply by 1.1 instead.

Can I enter parentheses?

Not on the Basic keypad. Switch to the Scientific tab at the top of this page and you get ( and ) keys that handle nesting inside a single expression. If you would rather stay on Basic, compute the grouped part first, press equals, and carry on from the result on the display.

Which keyboard keys work?

Digits, the decimal point, + and -, * for multiply, / for divide, Enter to evaluate, and Backspace to delete the last character you typed.

Why is input limited to 15 digits?

Beyond 15 digits the underlying double-precision format stops representing consecutive whole numbers exactly, so the extra digits would be decoration rather than data. The limit also keeps the display from overflowing its card on a phone.

Is there a memory key?

No M+, MR or MC. The expression line is the memory: it stays visible while you build the calculation, and the only way to hold a value across a clear is to write it down or paste it elsewhere.

Does 3 + 5 x 2 give 13 or 16 here?

13. Multiplication is evaluated before addition. Chain-entry desk calculators give 16 because they complete each operation as soon as the next operator key is pressed.

Related tools