CalcOpenly

Scientific calculator

Keypad calculator with trig in degrees, radians or gradians, logs, powers, factorials, memory and a history tape — exact fractions where possible.

Updated Checked against 4 worked examples

Degrees
0
 

About the scientific calculator

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.

Order of operations in this calculator

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:

LevelOperatorsGroupingExampleResult
1Brackets ( ) and [ ]Innermost first2(3 + 4)^298
2Postfix !, %, ², ³On the value just before2^3!64
3√ and ∛ typed as symbolsOn the next number or bracket only√16/41
4Powers ^ (or **)Right to left2^3^2512
5A function name without bracketsOn the next number and its powerssin 30^20
6Leading minus signAfter powers-3^2−9
7× ÷ mod of off, implicit multiplicationLeft to right8/2(2 + 2)16
8+ −Left to right10 − 4 − 33

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.

Implicit multiplication rules

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:

  • E-notation. 2e3 is 2 × 10³ = 2000 and 2e+1 is 20, but 2e + 1, with spaces, is 2 × e + 1 = 6.4366.
  • Commas. Outside brackets, 1,000 is one thousand. Inside a function's brackets a comma separates arguments, so max(1,000, 2) reads as max(1, 0, 2) and returns 2. Type 1000 there.
  • Suffixes. k, M, B and T multiply by 10³, 10⁶, 10⁹ and 10¹², and lakh and cr by 10⁵ and 10⁷: 2.5M is 2,500,000 and 3 cr is 30,000,000.

Degrees, radians and gradians

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.

DegreesRadians (exact)Radians (decimal)Gradians
1°π/1800.0174531.1111
30°π/60.52359933.3333
45°π/40.78539850
60°π/31.04719866.6667
90°π/21.570796100
180°π3.141593200
270°3π/24.712389300
360°2π6.283185400

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.

Exact fractions and 50-digit decimals

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.

Function reference

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.

InputWhat it doesExampleResult
sqrt(x), cbrt(x)Square and cube rootcbrt(-27)−3
root(x, n)nth rootroot(81, 4)3
x^yPower(-8)^(1/3)−2
abs(x)Absolute valueabs(-3.5)3.5
ln(x), exp(x)Natural log and e^xln(10)2.302585…
log(x), log(x, b), log2(x)Log base 10, base b, base 2log(8, 2)3
sin, cos, tanTrig in the current angle unitsin(30)0.5
asin, acos, atanInverse trigatan(1)45
atan2(y, x)Angle of the point (x, y)atan2(1, -1)135
sinh, cosh, tanh (and asinh…)Hyperbolic functionssinh(1)1.175201…
floor(x), ceil(x), trunc(x)Round down, round up, drop the fractionfloor(-2.5)−3
round(x, d)Round half away from zero to d decimalsround(2.675, 2)2.68
min, max, sum, avgOver any number of argumentsavg(2, 4, 9)5
gcd, lcmGreatest common divisor, least common multiplegcd(84, 126)42
n!, gamma(x)Factorial and gamma function7!5040
nCr(n, r), nPr(n, r)Combinations and permutationsnCr(52, 5)2598960
hypot(a, b)√(a² + b²)hypot(3, 4)5
a mod bRemainder, with the sign of b-7 mod 32
deg(x), rad(x)Radians to degrees, degrees to radiansdeg(pi)180
pi, e, tau, phiπ, e, 2π and the golden ratiophi1.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.

Ans, memory and the tape

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.

Worked examples

Powers and roots

Expression
2^10 + sqrt(49) * 3
Result
1,045

Checked against: 1024 + 7 × 3

Thirds are exact

Expression
1/3 + 1/6
Result
0.5
Exact fraction
1/2

Checked against: Common denominator 6: 2/6 + 1/6 = 3/6

Degrees

Expression
sin(30) + cos(60)
Result
1

Checked against: sin 30° = cos 60° = 1/2

Factorial

Expression
20!
Result
2.43290200817664 × 10¹⁸

Checked against: Python math.factorial(20)

Questions

How do I switch between degrees and radians?

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.

Why does 0.1 + 0.2 give exactly 0.3 here?

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.

What does 200 + 10% mean?

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.

How large a factorial can it calculate?

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.

How accurate is the scientific calculator?

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.

Where does the method come from?

decimal.js arbitrary-precision arithmetic (50 significant digits).

Related calculators

Allow optional Google Analytics to measure page visits? Calculators work either way. Privacy and choices

Optional analytics: off.