Powers and roots
- Expression
- 2^10 + sqrt(49) * 3
- Result
- 1,045
Checked against: 1024 + 7 × 3
Keypad calculator with trig in degrees, radians or gradians, logs, powers, factorials, memory and a history tape — exact fractions where possible.
A keypad calculator that evaluates whole expressions such as 2^10 + sqrt(50) × 3 with 50 significant digits. It keeps fractions exact while the answer is rational, so 1/3 + 1/6 shows 1/2 rather than 0.4999…, and it switches trigonometry between degrees, radians and gradians.
Beyond the four operations it has powers and roots, logarithms in any base, factorials (exact up to 10000!), combinations and permutations, a modulo operator, a memory register and an Ans key that reuses the last result. Every result goes onto a tape you can tap to reuse.
You can type as well as tap: implicit multiplication (2pi, 3(4+5)), percentages (200 + 10%), repeating decimals (0.(3)) and suffixes such as 1.5k all work.
The calculator reads a whole line before evaluating it, so the order of operations decides the answer. It follows the convention taught as PEMDAS or BODMAS, with a precise rule for each level. From the tightest binding to the loosest:
| Level | Operators | Grouping | Example | Result |
|---|---|---|---|---|
| 1 | Brackets ( ) and [ ] | Innermost first | 2(3 + 4)^2 | 98 |
| 2 | Postfix !, %, ², ³ | On the value just before | 2^3! | 64 |
| 3 | √ and ∛ typed as symbols | On the next number or bracket only | √16/4 | 1 |
| 4 | Powers ^ (or **) | Right to left | 2^3^2 | 512 |
| 5 | A function name without brackets | On the next number and its powers | sin 30^2 | 0 |
| 6 | Leading minus sign | After powers | -3^2 | −9 |
| 7 | × ÷ mod of off, implicit multiplication | Left to right | 8/2(2 + 2) | 16 |
| 8 | + − | Left to right | 10 − 4 − 3 | 3 |
Take 8/2(2 + 2), a common test of these rules. The bracket is worked out first, giving 8/2 × 4. Division and multiplication share a level, so they run left to right: 8/2 = 4, then 4 × 4 = 16. If the intended meaning was 8 divided by 2(2 + 2), write 8/(2(2 + 2)), which gives 1.
The same left-to-right rule means 1/2pi is (1/2) × π = 1.5708, not 1/(2π). Type 1/(2pi) for 0.159155. Powers, on the other hand, group from the right: 2^3^2 is 2^9 = 512, not 8² = 64.
A leading minus sign is applied after the power, so -3^2 = −9, matching the algebra convention that −x² means −(x²). To square a negative number, bracket it: (-3)^2 = 9. A minus sign directly after ^ belongs to the exponent, so 2^-1 = 0.5.
A multiplication sign can be left out when a number or closing bracket is followed by a name, a function, an opening bracket or a root sign: 2pi, 3(4 + 5), 2 sin(30), (1 + 2)(3 + 4) and 4√9 all multiply. Implicit multiplication has exactly the same priority as ×, which is why 8/2(2 + 2) and 1/2pi come out as above. If you copy an expression written for a reader, add brackets around anything meant as a denominator.
A digit is multiplied in only after a closing bracket or a factorial: (1 + 2)3 = 9 and 4!/(2!2!) = 6. Two bare numbers side by side, as in 2 3, stop with "Expected an operator", because a missing operator is more likely than a product. Letters that are not a constant, function or suffix, such as the x in 2x, give "Unknown name".
A function name without brackets takes only the next number and any power attached to it. In radians, sin 2pi means sin(2) × π = 2.8566, while sin(2pi) is 0; in degrees, sin 30^2 is sin(900°) = 0, not (sin 30°)² = 0.25. The keypad inserts brackets after every function name, which avoids the question.
Three typing details change a result without any error:
Angles start in degrees. A full turn is 360°, 2π radians or 400 gradians, so each unit converts to the others by a fixed ratio.
| Degrees | Radians (exact) | Radians (decimal) | Gradians |
|---|---|---|---|
| 1° | π/180 | 0.017453 | 1.1111 |
| 30° | π/6 | 0.523599 | 33.3333 |
| 45° | π/4 | 0.785398 | 50 |
| 60° | π/3 | 1.047198 | 66.6667 |
| 90° | π/2 | 1.570796 | 100 |
| 180° | π | 3.141593 | 200 |
| 270° | 3π/2 | 4.712389 | 300 |
| 360° | 2π | 6.283185 | 400 |
The mistake to watch for is a textbook angle in the wrong mode: sin(30) is 0.5 in degrees but −0.988032 in radians, where it means 30 radians. If a trig answer looks wrong, check the mode shown at the top of the display first. Inverse functions answer in the current unit, so atan(1) returns 45 in degrees and 0.785398 in radians.
The functions deg() and rad() convert a number between radians and degrees whatever the mode, but they do not switch the mode. In degree mode, sin(rad(30)) takes the sine of 0.5236 degrees and returns 0.0091384. The graphing calculator always works in radians.
In degree mode, multiples of 90° and the angles whose sine or cosine is ±1/2, or whose tangent is ±1, come out exact: sin(150) is exactly 0.5 and cos(90) is exactly 0. Other angles, such as sin(45) = 0.70710678…, are irrational and carry 50 significant digits. tan(90) has no value and returns an error rather than a huge number.
Addition, subtraction, multiplication, division, whole-number powers, percentages and repeating decimals keep an exact fraction, as do abs, floor, ceil, round, trunc, sign, min, max, sum, avg and mod. When the answer is not a whole number, the exact fraction appears in front of the decimal, provided its numerator and denominator have 18 digits or fewer between them: 100/7 shows as 100/7 = 14.2857142857.
A root, logarithm, trig function, π, e or a non-whole power switches the calculation to 50 significant digits, and the fraction line disappears even when the true value is rational. sqrt(4)/3 shows 0.666666666667 without 2/3; type 2/3 to keep it exact. The last of the 50 digits can be off by one: sqrt(2)^2 is held as 1.999… with 49 nines, and acos(0.5) in degrees as 59.999…998. The display rounds to 12 significant figures by default, so both read as 2 and 60.
Working in decimal also settles rounding ties the way they look on paper. round(2.675, 2) returns 2.68 here. In binary floating point 2.675 is stored as 2.67499999…, which is why Python's round() documentation notes that the same call gives 2.67 there. Halves round away from zero: round(2.5) is 3 and round(-2.5) is −3.
Every function below can be typed; the keypad covers the common ones, with a 2nd key for inverse and hyperbolic trig. Results are for degree mode.
| Input | What it does | Example | Result |
|---|---|---|---|
| sqrt(x), cbrt(x) | Square and cube root | cbrt(-27) | −3 |
| root(x, n) | nth root | root(81, 4) | 3 |
| x^y | Power | (-8)^(1/3) | −2 |
| abs(x) | Absolute value | abs(-3.5) | 3.5 |
| ln(x), exp(x) | Natural log and e^x | ln(10) | 2.302585… |
| log(x), log(x, b), log2(x) | Log base 10, base b, base 2 | log(8, 2) | 3 |
| sin, cos, tan | Trig in the current angle unit | sin(30) | 0.5 |
| asin, acos, atan | Inverse trig | atan(1) | 45 |
| atan2(y, x) | Angle of the point (x, y) | atan2(1, -1) | 135 |
| sinh, cosh, tanh (and asinh…) | Hyperbolic functions | sinh(1) | 1.175201… |
| floor(x), ceil(x), trunc(x) | Round down, round up, drop the fraction | floor(-2.5) | −3 |
| round(x, d) | Round half away from zero to d decimals | round(2.675, 2) | 2.68 |
| min, max, sum, avg | Over any number of arguments | avg(2, 4, 9) | 5 |
| gcd, lcm | Greatest common divisor, least common multiple | gcd(84, 126) | 42 |
| n!, gamma(x) | Factorial and gamma function | 7! | 5040 |
| nCr(n, r), nPr(n, r) | Combinations and permutations | nCr(52, 5) | 2598960 |
| hypot(a, b) | √(a² + b²) | hypot(3, 4) | 5 |
| a mod b | Remainder, with the sign of b | -7 mod 3 | 2 |
| deg(x), rad(x) | Radians to degrees, degrees to radians | deg(pi) | 180 |
| pi, e, tau, phi | π, e, 2π and the golden ratio | phi | 1.618034… |
Two rows behave differently from some other tools. The remainder takes the sign of the divisor, so -7 mod 3 is 2, where JavaScript's % operator gives −1. A negative base with a fractional power returns a real result only for odd roots: (-8)^(1/3) is −2, while (-4)^0.5 stops with an error. Square roots of negative numbers belong in the complex number calculator, and the permutations and combinations calculator lists the arrangements behind nCr and nPr.
After =, pressing an operator key continues from the answer: the line becomes ans followed by the operator. ans holds 50 significant digits rather than the 12 on the display, but it is a decimal, not a fraction, so exactness ends at =: 1/7, then × 7, displays 1 while holding 0.999…98. Typing 1/7*7 on one line gives exactly 1. Pressing a digit instead starts a new calculation. M+ and M− add the current result to, or subtract it from, a memory value M, and MR inserts M into the line. The tape keeps the last 50 results on this device; tap one to reuse it.
Checked against: 1024 + 7 × 3
Checked against: Common denominator 6: 2/6 + 1/6 = 3/6
Checked against: sin 30° = cos 60° = 1/2
Checked against: Python math.factorial(20)
Tap the DEG key to cycle through degrees, radians and gradians; the current mode is shown at the top of the display. In degrees, sin(30) is exactly 0.5 and cos(90) is exactly 0: angles whose sine or cosine is 0, ±1/2 or ±1, or whose tangent is ±1, are evaluated exactly. Irrational values such as sin(45) = √2/2 are computed to 50 significant digits.
Most calculators and programming languages store numbers in binary floating point, where 0.1 has no exact representation, so 0.1 + 0.2 comes out as 0.30000000000000004. This calculator works in decimal with 50 significant digits and keeps rational results as exact fractions, so the sum is exactly 0.3.
It follows the desk-calculator convention: adding a percentage adds that percentage of the number before it, so 200 + 10% = 220 and 200 − 10% = 180. On its own, 10% means 0.1, and '15% of 240' gives 36.
Integer factorials are exact up to 10000!, which has 35,660 digits; the display shows them in scientific notation and 'Copy exact' copies every digit. Non-integer arguments use the gamma function, so 0.5! = √π/2 ≈ 0.886227.
Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 4 worked examples whose answers come from independent sources; for example, “Powers and roots” is checked against 1024 + 7 × 3.
decimal.js arbitrary-precision arithmetic (50 significant digits).
Allow optional Google Analytics to measure page visits? Calculators work either way. Privacy and choices
Optional analytics: off.