Basic Calculator with History
A free basic calculator with history: your last 20 results are saved, with brackets, a percent key and keyboard entry.
History
No calculations yet. Press = and each result is saved here, on this device only. Tap a past result to use it again.
How to use the Basic Calculator
- Tap the buttons or type on your keyboard: digits, + − * /, % and brackets.
- Watch the result update as you type. The full expression stays visible above it.
- Press = or Enter to finish. The calculation is saved to the history list.
- Press Backspace to delete the last character and Esc (or AC) to start over.
- Tap any past result in the history to reuse it in a new calculation.
Formula
( ) → × ÷ (left to right) → + − (left to right)
Where:
- ( )
- Brackets are worked out first, innermost first. Unclosed brackets are closed for you at the end.
- × ÷
- Multiplication and division come next, working from left to right
- + −
- Addition and subtraction come last, working from left to right
- a + b%
- Adds b percent of a: 200 + 10% = 220. Likewise, a − b% = a − (a × b ÷ 100)
- a × b%
- Any other percent is b ÷ 100: 50 × 10% = 5, and 10% on its own is 0.1
This is the order of operations taught as PEMDAS in the US and BODMAS or BIDMAS in the UK, India and Australia (there are no exponents on this keypad). Results are exact decimals, shown to 15 significant digits.
Worked example
You buy 3 notebooks at $4.75 each and a $12.40 pen set, and the store adds 8% sales tax. You type 3 × 4.75 + 12.40 + 8%.
- Multiplication comes before addition: 3 × 4.75 = 14.25.
- Add the pen set: 14.25 + 12.40 = 26.65.
- “+ 8%” adds 8% of the running total: 26.65 × 8 ÷ 100 = 2.132.
- Total: 26.65 + 2.132 = 28.782.
The calculator shows 28.782, so the bill comes to $28.78.
How the calculation history works
Each time you press = or Enter, the finished sum and its answer are added to the History panel. The panel keeps your last 20 calculations, newest first, and drops the oldest one when a 21st arrives.
- Reuse a result. Tap or click an entry and it returns to the display as a finished calculation. Type an operator to carry on from that answer, or a digit to start something new.
- It survives a reload. The list is saved in your browser's local storage, so it is still there when you return to the page in the same browser on the same device.
- It stays private. Nothing is uploaded. A private window loses the list when it closes, and if your browser blocks storage the list lasts only until you leave the page.
- Clear it any time. The Clear history button empties the list at once.
There are no memory keys (MC, MR, M+, M−) on this keypad. The history covers the same need: instead of storing one number, every result is kept and can be recalled with one tap.
Using the keypad and keyboard
You can tap the large on-screen keys, type on a physical keyboard, or mix the two.
| Key | On a keyboard | What it does |
|---|---|---|
| AC | Esc or Delete | Clears everything and starts again |
| ⌫ | Backspace | Removes the last character, or clears a finished result |
| ( ) | ( ) | Opens and closes a bracket |
| % | % | Percent, explained below |
| × ÷ | * or x, and / | Multiply and divide |
| = | Enter or = | Finishes the calculation and saves it to the history |
The result updates after every key, and the line above it shows the whole expression, so a mistyped digit is easy to spot before you press equals. After a result, a number starts a new calculation while an operator carries on from the answer. That makes running totals easy: 120 = then + 45 = gives 165.
The keypad also catches common slips. Two operators in a row swap the first for the second, and a second decimal point in the same number is ignored. Enter 1250, not 1,250: on the keyboard a comma is read as a decimal point.
Brackets and the order of operations
Consider 20 − 4 × 3 + 6 ÷ 2. A calculator that works strictly from left to right does 20 − 4 = 16, then 16 × 3 = 48, then 48 + 6 = 54, then 54 ÷ 2 = 27. The agreed convention, taught as PEMDAS in the United States and BODMAS or BIDMAS in the UK, India and Australia, puts multiplication and division first:
- 4 × 3 = 12 and 6 ÷ 2 = 3.
- The expression becomes 20 − 12 + 3.
- Working left to right: 20 − 12 = 8, then 8 + 3 = 11.
This keypad gives 11. If you really want the left-to-right answer, add brackets (parentheses in US usage): ((20 − 4) × 3 + 6) ÷ 2 = 27. Brackets can be nested, and any you leave open are closed for you when the answer is worked out. Only the final answer is shown, not each reduction step, and there are no exponents.
How the percent key works
The % key follows the convention of phone and handheld calculators.
- After + or −, the percentage is taken of the running total: 200 + 10% = 220 and 200 − 10% = 180.
- Anywhere else it divides by 100: 50 × 10% = 5.
- Inside its own brackets it is a plain number: 200 + (10%) = 200.1.
A worked example: four friends share a restaurant bill of $186.40, add an 18% tip and split the total evenly. Type it as one line, (186.40 + 18%) ÷ 4.
- Inside the brackets, "+ 18%" adds 18% of 186.40: 186.40 × 18 ÷ 100 = 33.552.
- The bracket total is 186.40 + 33.552 = 219.952.
- Dividing by 4 gives 54.988.
Each person pays about $54.99. Without the brackets, only the percentage would be divided by 4. For questions such as "X is what percent of Y," the percentage calculator shows the formula with your numbers.
Four-function or scientific: which do you need?
A four-function keypad like this one covers shopping totals, bills, budgets and most school arithmetic. It has no square root, exponent or sign change key; for a negative number, type the minus sign before it. When a problem needs roots, powers, logarithms, trigonometry or stored memory, switch to the scientific calculator.
Assumptions and limits
- Exact decimals. Arithmetic uses 40 significant digits and the display rounds to 15, so 4.35 × 100 is exactly 435, where binary floating point gives 434.99999999999994, and (1 ÷ 3) × 3 shows 1.
- Long results. Very large or very small answers switch to scientific notation, such as 1e+21.
- Length. An expression can be up to 100 characters long.
- Division by zero. 5 ÷ (3 − 3) has no answer, so "Cannot divide by zero" appears instead of a number.
Frequently asked questions
How do I view my calculation history?
Every calculation you finish with = or Enter is added to the History panel, newest first, up to 20 entries. Tap an entry to put it back on the display and carry on from its result. The list is stored in your browser's local storage on this device only, and nothing is sent to a server. Clear history deletes it, and clearing your browser data or using a private window also removes it.
How do I do a percentage on a calculator?
Use the % key. After + or −, the percentage is taken of the amount before it: 200 + 10% = 220 and 200 − 10% = 180, which is handy for adding tax or taking off a discount. Anywhere else, % simply divides by 100, so 80 × 15% = 12 gives 15% of 80. Put a percent in brackets, such as 200 + (10%), to add 0.1 instead.
What is the PEMDAS or BODMAS rule, and does this calculator follow it?
PEMDAS (US) and BODMAS or BIDMAS (UK, India, Australia) name the same order of operations: brackets first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. This keypad follows it, so 2 + 3 × 4 = 14, not 20. It has no exponent key and shows the answer without the working. Many cheap handheld calculators go strictly left to right and would show 20.
Does it have memory keys such as M+ and MR?
No. There are no MC, MR, M+ or M− keys, and no square root or sign change key either. The history does the job of memory: each finished result is kept, and tapping one brings it back so you can continue with + − × ÷. For a negative number, type the minus sign first. For roots and a memory you can add to, use the scientific calculator.
What is the difference between a basic and a scientific calculator?
A basic, or four-function, model adds, subtracts, multiplies and divides, usually with percent and brackets. That covers shopping, bills, budgets and most school arithmetic. A scientific one adds powers, roots, logarithms, trigonometry, factorials and constants such as π. This page is the first kind. If you need a square root, an exponent or a sine, open the scientific calculator instead.
Why does 0.1 + 0.2 equal exactly 0.3 here?
Most software stores numbers in binary floating point, which cannot represent 0.1 exactly, so 0.1 + 0.2 comes out as 0.30000000000000004. This calculator uses decimal arithmetic with 40 significant digits, the way you would do it on paper, and rounds only the displayed result to 15 digits.
Related calculators
- Percentage CalculatorA percentage calculator: of a number, as a share of a total, or back to the whole from a part, with the formula shown.
- Fraction CalculatorA fraction calculator with steps: add, subtract, multiply or divide two fractions or mixed numbers and follow every line of the working.
- Average CalculatorAn average calculator of numbers in any list: paste or type them to get the mean, median, mode and range in one step.
- Percentage Change CalculatorA percentage change calculator between two numbers: the percent increase or decrease from old to new, or the percentage difference.
Last updated: