Basic Calculator
Type or tap a whole calculation. Decimals come out exact, and you can see how your calculation was grouped.
Results
Result
54.4425
Read as ((4 × 12.75) + (3 × 4.35)) − 15% of that
Note: How % was read
Right after −, a percentage is a percentage of the amount before the sign: 15% of 64.05 is 9.6075, so the result is 64.05 − 9.6075 = 54.4425. To subtract 0.15 itself, put the percentage in parentheses: − (15%).
- To 2 decimal places
- 54.44Whole number: 54. Halves round away from zero.
- All digits
- 54.4425Exact: nothing was rounded.
- Binary floating point
- 54.442499999999995The same steps in binary floating point (IEEE 754 doubles), where 0.1 can’t be stored exactly.
How this was calculated
- Read as ((4 × 12.75) + (3 × 4.35)) − 15% of that: parentheses first, then × and ÷, then + and −, each from left to right.
- 4 × 12.75 = 51
- 3 × 4.35 = 13.05
- 51 + 13.05 = 64.05
- 15% of 64.05 = 64.05 × 0.15 = 9.6075
- 64.05 − 9.6075 = 54.4425
| Line | Entry | Amount | Running total |
|---|---|---|---|
| 1 | 4 × 12.75 | 51 | 51 |
| 2 | + 3 × 4.35 | 13.05 | 64.05 |
| 3 | − 15% of 64.05 | −9.6075 | 54.4425 |
Assumptions
- Order: parentheses first, then × and ÷ from left to right, then + and − from left to right. 2(3) counts as 2 × 3, so 8 ÷ 2(2 + 2) = (8 ÷ 2) × 4 = 16.
- % divides by 100, except right after + or −, where b% means b% of the amount before the sign (50 + 10% = 55). Write 50 + (10%) to add 0.1 instead.
- Decimals are worked out exactly in base 10, so 0.1 + 0.2 = 0.3. Each operation keeps 34 significant digits; results that need more, such as 1 ÷ 3, are rounded and marked in the steps.
- The result shows 16 significant digits, halves rounded away from zero, in scientific notation below 0.000001 and from 10¹⁶ up.
- Powers (^) must be whole numbers. There are no square roots, π or functions here.
- The history and memory last until you leave or reload the page. Nothing is stored or sent.
Calculated in your browser. This site doesn't send the numbers you enter anywhere. “Continue in” links pass them to the next calculator within this browser tab only.
History
Calculations you finish with = or Calculate appear here, newest first: the last 10, on this page only.
What this calculator does differently
It takes a whole calculation at once, such as a receipt total with a discount, and answers as you type. Three things set it apart from a desk calculator: it follows the order of operations and shows how it grouped your numbers, it works in exact decimals so 0.1 + 0.2 is 0.3, and it keeps your last 10 answers on the page so you can reuse them.
How to use the calculator with your keyboard
- Type or paste the calculation in the Expression field, or tap the keys.
*andxbecome ×,/becomes ÷ and-becomes −. Commas that group thousands are fine: 1,250 is read as 1250. - Enter or = finishes the calculation: the answer becomes Ans and joins the history.
- Backspace deletes one character. Esc or C clears everything (AC), and Delete at the end of the line clears the last number (CE).
- ^ raises to a whole-number power, and % works as described below.
The result updates while you type. The Try buttons load five cases this page explains: the order of operations, 0.1 + 0.2, the % key, a repeating decimal and implied multiplication.
Worked example: four tickets and three drinks, 15% off
Four tickets at $12.75 and three drinks at $4.35, with 15% off the whole order. Type 4 × 12.75 + 3 × 4.35 − 15%:
- Read as ((4 × 12.75) + (3 × 4.35)) − 15% of that: the two multiplications come first.
- 4 × 12.75 = 51 and 3 × 4.35 = 13.05.
- 51 + 13.05 = 64.05, the order before the discount.
- 15% of 64.05 = 64.05 × 0.15 = 9.6075.
- 64.05 − 9.6075 = 54.4425, or $54.44 to 2 decimal places.
The running total under the steps shows the same order line by line: 51, then 64.05, then 54.4425. The same steps in binary floating point give 54.442499999999995, because 4.35 and 0.15 can’t be stored exactly in binary. Here every step is exact.
Order of operations: why 3 + 5 × 2 = 13
Parentheses come first, then multiplication and division from left to right, then addition and subtraction from left to right. So 3 + 5 × 2 = 3 + 10 = 13, while (3 + 5) × 2 = 16.
Two calculators can disagree because simple ones work in the order you press the keys: 3 + 5 × 2 = on a chain calculator adds first and shows 16. Here the “Read as” line wraps each operation in its own pair of parentheses, which lets you confirm the grouping before you use the answer: 3 + 5 × 2 is read as 3 + (5 × 2).
Multiplication written without a sign, as in 2(2 + 2), is an ordinary × here: same level as ÷, worked from left to right. So 8 ÷ 2(2 + 2) = (8 ÷ 2) × 4 = 16. Some calculators and books give implied multiplication priority and get 1. Parentheses settle it: 8 ÷ (2(2 + 2)) = 1.
How the % key works here
A percentage is a number out of 100, so 10% on its own is 0.1. Right after + or −, a percentage means a percentage of the amount before the sign, which is what you want for adding a markup or taking off a discount:
| You type | Read as | Result |
|---|---|---|
| 50 + 10% | 50 + 10% of that | 55 |
| 50 − 10% | 50 − 10% of that | 45 |
| 50 × 10% | 50 × (10%) | 5 |
| 50 ÷ 10% | 50 ÷ (10%) | 500 |
| 50 + (10%) | 50 + (10%) | 50.1 |
“That” is everything before the sign: in the worked example, 15% is taken of 64.05, not of 3 × 4.35. Percentages in a row build on each other: 50 + 10% + 10% = 55 + 5.5 = 60.5. A note under each result says how its % was read. For percent change, reverse percentages or percentage points, use a percentage calculator.
Why some calculators show 0.30000000000000004
Python, C, Java and many other programming languages store numbers in binary floating point (IEEE 754 doubles). Decimals such as 0.1 and 0.2 have no exact binary form, just as 1/3 has no exact decimal form, so each is stored as the nearest binary fraction, and their sum comes out as 0.30000000000000004. This calculator works in base 10 instead: the numbers you type are used exactly, so 0.1 + 0.2 = 0.3, and 1,249.99 × 3 = 3,749.97 where binary gives 3,749.9700000000003. Whenever binary would give a different answer, a Binary floating point tile shows it beside yours.
Repeating a calculation with =
- Right after =, an operator continues from the answer: press × then 2 and the line reads Ans×2. A number starts a new calculation.
- = again repeats the last operation on the new answer: 3 + 2 = shows 5, = again shows 7, then 9. After 100 − 15% =, each = takes another 15% off: 85, then 72.25.
- Ans holds all 34 digits of the last answer, so 2 ÷ 3 = followed by × 3 gives exactly 2. Retyping the 16 digits shown, 0.6666666666666667 × 3, would give 2.0000000000000001.
Clear entry vs. clear all
CE removes the last number you typed and keeps the rest: on 50 + 10% it leaves 50 +, ready for a different percentage. AC clears the whole calculation, and ⌫ deletes one character (Ans in one press). None of them touches the memory: M+ adds the current result to it, M− subtracts it, MR puts the stored number at the cursor and MC empties it.
Reading the result
- Result: the answer to 16 significant digits, with the grouping it used (“Read as”).
- To 2 decimal places: rounded for money, a 5 or more rounding up: 2.675 becomes 2.68. The whole-number rounding is under it.
- All digits: every digit kept, up to 34. For a result that never ends, the tile shows the exact value instead: 2 ÷ 3 = 0.(6) = 2/3, where the digits in parentheses repeat forever.
- Binary floating point: what the same steps give in binary floating point, the number format of many programming languages, when that differs. For ordinary results that agree, this tile shows scientific notation instead.
- How this was calculated: each operation in the order it was done, with its value.
- Running total: one line per + or − in the calculation, with a CSV download.
The History under the results lists your last 10 finished calculations. Select one to load it again, or its result to insert it at the cursor.
Big numbers, small numbers and rounding
From 10¹⁶ up and below 0.000001, the result switches to scientific notation, a number times a power of 10: 2^70 is shown as 1.180591620717411 × 10²¹, and the All digits tile writes out all of it, 1,180,591,620,717,411,303,424. Each step keeps 34 significant digits, the size of the decimal128 format. A step that needs more, such as 2 ÷ 3, is rounded there and the steps say so. That is why 1 ÷ 3 × 3 is shown as 1 while All digits reads 0.9999999999999999999999999999999999 and gives the exact answer, 1.
Limits of this calculator
- It has +, −, ×, ÷, %, parentheses and whole-number powers. For square roots, π, trigonometry and logarithms use the scientific calculator; the link under the keypad takes your expression along.
- A calculation can be up to 500 characters long.
- Implied multiplication, 2(3), has the same priority as × and ÷, and % after + or − follows the rule above. Other calculators may read those two cases differently.
- The decimal separator is a point. A comma is accepted only between groups of three digits, so 2,5 is an error rather than 2.5.
- The history and the memory last until you reload or leave the page.
Common mistakes
- Expecting key-press order. 3 + 5 × 2 is 13 here, not 16. Put the part you want first in parentheses.
- Assuming a percentage undoes itself. 100 + 10% − 10% is 99, not 100: the 10% taken off is 10% of 110.
- Putting a percentage in parentheses by accident. 80 + (15%) adds 0.15, giving 80.15. Leave the parentheses off to add 15% of 80.
- Squaring a negative without parentheses. Powers come before the sign, so −2^2 = −4, while (−2)^2 = 4.
- Typing spaces inside a number. 1 000 is read as two numbers, and the error says so. Write 1000 or 1,000.
Questions
Does the calculator keep my history after I leave?
No. History and memory exist only while this page is open, so reloading or closing it clears both, and none of it leaves your browser. Copy history or Download CSV of history gives you a record to keep.
How do I enter a negative number?
Type or tap − in front of it, as in 3 × −2 = −6, or press ± after the number. After a + or −, ± swaps that sign instead, so 3 − 2 becomes 3 + 2, which is the same as 3 − (−2).
Why doesn’t my phone’s keyboard open when I tap the expression?
So that it doesn’t hide the keypad. Tapping the line only moves the cursor, and the keys do the typing. If you’d rather use your own keyboard or dictation, turn on Phone keyboard beside the Expression label.
Does it do square roots or exponents?
Whole-number powers only, typed with ^ (1.05^10 or 2^−3). For square roots, π, trigonometry, logarithms or powers such as 2^0.5, use the scientific calculator; the link under the keypad carries your expression there.
Sources
- Prealgebra 2e, 2.1 Use the Language of Algebra (order of operations) OpenStax (Rice University) Parentheses first, then multiplication and division from left to right, then addition and subtraction from left to right (18 ÷ 9 · 2 = 4).
- Order of operations (calculators and implied multiplication) Wikipedia Simple calculators with chain input work in key-press order (1 + 2 × 3 = 9) while others use precedence (7); implied multiplication is often given higher precedence than ÷.
- Prealgebra 2e, 6.1 Understand Percent OpenStax (Rice University) A percent is a ratio whose denominator is 100.
- Prealgebra 2e, 5.1 Decimals (rounding decimals) OpenStax (Rice University) To round, look at the next digit; 5 or more adds 1 to the kept digit (18.379 to the nearest hundredth is 18.38).
- Prealgebra 2e, 5.3 Decimals and Fractions OpenStax (Rice University) Dividing numerator by denominator can give a repeating decimal whose digits repeat endlessly (43/22 = 1.9545…).
- Prealgebra 2e, 10.5 Integer Exponents and Scientific Notation OpenStax (Rice University) Scientific notation writes a number as a × 10ⁿ (8.9 × 10⁻² = 0.089).
- Floating-Point Arithmetic: Issues and Limitations Python Software Foundation (Python documentation) Most decimal fractions, such as 0.1, can’t be stored exactly as binary floating-point numbers (IEEE 754 doubles), so sums like 0.1 + 0.1 + 0.1 miss 0.3.
- decimal.js API (precision) decimal.js (Michael Mclaughlin) The decimal library used here; precision is the maximum number of significant digits kept in the result of each operation.
- decimal128 floating-point format Wikipedia The IEEE 754 decimal128 format holds 34 significant decimal digits.
Smart Financial Calc: https://smartfinancialcalc.com/math/basic-calculator/