How to use it
- Choose Basic or Scientific mode and, for trigonometry, degrees or radians.
- Type the expression on your keyboard or tap the keys. Functions take parentheses: sin(45), ln(2), √(16). π, e and Ans can be used anywhere.
- Watch the live result; any problem (unbalanced parentheses, division by zero) is explained under the field.
- Press Enter or = to commit the calculation – it appears in the history and becomes Ans for the next expression. Typing an operator right after = continues from the answer.
- Use M+ / M− to accumulate results in memory, MR to insert the memory value, and Copy result or the link to share.
Example
3+4×2÷(1−5)^2^3: the power chain is evaluated right to left, 2^3 = 8 then (−4)^8 = 65,536; 4 × 2 ÷ 65,536 = 0.0001220703125; plus 3 gives 3.0001220703125. In degree mode, 2sin(30)+cos(60) = 2 × 0.5 + 0.5 = 1.5. 10!/(8!×2!) = 3,628,800 ÷ (40,320 × 2) = 45, the number of ways to choose 2 items from 10.
How expressions are evaluated
1. Tokenizer: numbers (1.5, .5, 2e3), names (sin, pi, ans), operators (+ − × ÷ ^ ! % ²), parentheses;
an implied × is inserted between a value and a following value, name or "("
2. Shunting-yard: tokens → reverse Polish notation using precedence
postfix (! % ²) > functions, √ > ^ (right-assoc) > unary − > × ÷ > + −
3. Stack evaluation of the RPN with error checks (division by zero, domain errors, overflow)Numbers are IEEE-754 doubles (about 15–16 significant digits); results are shown to 12 significant digits so that 0.1 + 0.2 displays as 0.3. Values above 10¹⁵ or below 10⁻⁹ switch to exponent notation. Factorial accepts whole numbers up to 170 (171! overflows). Percent divides by 100, so 200 × 10% = 20 and 50% = 0.5 – it does not add a percentage to the preceding number the way some desk calculators do. Degrees are converted with π/180; in degree mode exact multiples of 90° return exact 0, 1 or −1 instead of values like 1.2 × 10⁻¹⁶. Inverse functions return degrees or radians according to the mode. The history and memory live in the page only; the expression is kept in the link so a calculation can be shared.
Sources: Dijkstra, E. W. – Shunting-yard algorithm (1961), IEEE 754 floating-point arithmetic.
Keyboard shortcuts
Everything can be typed: * or × for multiplication, / or ÷ for division, ^ for powers, ! for factorial, % for percent, sqrt or√ for roots, pi or π, e, ans. Enter evaluates, Escape clears, Backspace deletes. Names are not case-sensitive.
Questions
- Why is −2² equal to −4?
- Because exponentiation binds tighter than the minus sign, as in written mathematics and in most scientific calculators: −2² means −(2²). Type (−2)² to square the negative number.
- Why does sin(30) give 0.5 but sin(pi/6) does not?
- The angle mode applies to both. In degree mode sin(pi/6) is the sine of 0.52 degrees. Switch to radians for sin(pi/6) = 0.5.
- Is 2e3 two thousand or 2 × e × 3?
- Two thousand: a digit followed by e and more digits is read as scientific notation. 2e on its own, or 2×e, is 2 × 2.718. Use the e key or type e separately when you mean the constant.
- Where did the basic calculator go?
- It is the Basic mode of this page: the same keys without the scientific row. Parentheses, percent and the keyboard still work.