Scientific calculator

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

Drafted with AI writing toolsUpdated Checked examples: 4

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.

How to use the online scientific calculator

Type the calculation as one line, the way you would write it. Brackets come first, then powers, then × and ÷ from left to right, then + and −: 2 + 3 × 4^2 = 2 + 48 = 50. Angles are in degrees unless you switch to radians, and fractions stay exact: 3/4 − 1/6 = 7/12.

Common calculations and how to type them:

TaskType in ExpressionResult
Add, then multiply(12 + 8) * 360
Divide a total equally84 / 421
Add fractions1/3 + 1/61/2 = 0.5
Find a percentage15% of 24036
Add 10% to a price200 + 10%220
Subtract a 10% discount200 - 10%180
Square a number12^2144
Take a square rootsqrt(144)12
Find a base-10 logarithmlog(1000)3
Find sine in degreessin(30), with DEG selected0.5

Brackets change the order: (12 + 8) × 3 = 60, but 12 + 8 × 3 = 36, because the multiplication runs before the addition. Add brackets whenever you are unsure how a line will be read.

For trig, match the angle unit to the problem. sin(30) = 0.5 in degrees; in radians, the same angle is sin(pi/6). The inverse sine sin⁻¹, typed asin(0.5), returns the angle 30°. It is not the reciprocal 1/sin(30) = 2.

How does the percent key work?

On its own, 10% is 0.1, so 200 × 10% = 20 and 15% of 240 = 36. After + or −, the percentage is taken of the number before it: 200 + 10% = 220 and 200 − 10% = 180. To add the decimal 0.1, type 200 + 0.1.

To find a percentage change, or what percent one number is of another, use the percentage calculator.

Which math calculator should I use?

An expression has to work out to a number, so a letter such as x has no value. To solve ax² + bx + c = 0 for x, use the quadratic equation solver, and to plot a function, the graphing calculator. To write a very large or very small number in powers of ten, or to apply significant-figure rules, use the scientific notation calculator.

For fraction arithmetic with every step shown, use the fraction calculator. Browse all calculators for money, dates and measurements.

Order of operations: PEMDAS and BODMAS

PEMDAS and BODMAS name the same convention. These are the exact rules, 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 gives 4, then ÷ and × run left to right: 8/2 = 4 and 4 × 4 = 16. If 8 is meant to be divided by 2(2 + 2), type 8/(2(2 + 2)), which gives 1.

The same left-to-right rule makes 1/2pi equal (1/2) × π = 1.5708, not 1/(2π). Type 1/(2pi) for 0.159155. Powers group from the right instead: 2^3^2 = 2^9 = 512, while (2^3)^2 = 64.

A leading minus sign applies after the power, so -3^2 = −9, matching −x² = −(x²) in algebra. To square a negative number, bracket it: (-3)^2 = 9. A minus sign right after ^ belongs to the exponent, so 2^-1 = 0.5.

Implicit multiplication rules

You can leave out × between a number or closing bracket and a name, function, opening bracket or root sign: 2pi, 3(4 + 5), 2 sin(30), (1 + 2)(3 + 4) and 4√9 all multiply. This has the same priority as ×, which is why 8/2(2 + 2) is 16.

A digit multiplies only after a closing bracket or a factorial: (1 + 2)3 = 9 and 4!/(2!2!) = 6. Two bare numbers such as 2 3 are an error, as is the x in 2x, because x is not a defined name.

A function name without brackets takes only the next number and its power. In radians, sin 2pi means sin(2) × π = 2.8566, while sin(2pi) = 0. In degrees, sin 30^2 is sin(900°) = 0; type sin(30)^2 for (sin 30°)² = 0.25.

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 a comma separates arguments, so max(1,000, 2) reads as max(1, 0, 2) and returns 2.
  • 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

A full turn is 360°, 2π radians or 400 gradians, so each unit converts to the others by a fixed ratio. Calculations start in degrees.

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 usual mistake 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. Inverse functions answer in the current unit, so atan(1) is 45 in degrees and 0.785398 in radians.

deg() and rad() convert a number between radians and degrees without changing 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 degrees, angles whose sine or cosine is 0, ±1/2 or ±1, or whose tangent is ±1, come out exact: sin(150) = 0.5 and cos(90) = 0. Others, such as sin(45) = 0.70710678…, carry 50 significant digits. tan(90) has no value and gives an error.

Exact fractions and 50-digit decimals

Arithmetic, whole-number powers, percentages, repeating decimals such as 0.(3), and abs, round, min, max and mod keep an exact fraction. A fraction of up to 18 digits is shown beside the decimal: 100/7 = 14.2857142857.

Roots, logarithms, trig, π, e and non-whole powers switch to 50 significant digits and drop the fraction: sqrt(4)/3 shows 0.666666666667, while 2/3 stays exact. Answers are rounded to 12 significant figures by default, so sqrt(2)^2, held as 1.999…9, reads 2.

Decimal arithmetic also rounds ties the way they look on paper: round(2.675, 2) = 2.68. Binary floating point stores 2.675 as 2.67499999…, which is why Python's round() documentation gives 2.67. Halves round away from zero: round(-2.5) = −3.

Scientific functions and constants

Function arguments go in brackets. Trig results below assume 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…

The remainder takes the sign of the divisor, so -7 mod 3 = 2, where JavaScript's % gives −1. (-8)^(1/3) = −2, but (-4)^0.5 has no real value; use the complex number calculator. The permutations and combinations calculator explains what nCr and nPr count.

Chained answers and exactness

A result reused in the next calculation carries its 50-digit decimal, not its fraction. So 1/7 followed by × 7 shows 1 but holds 0.999…98, while 1/7*7 typed as one line is exactly 1. Keep a calculation on one line when you need an exact answer.

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: Independent calculation

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 computed exactly up to 10000!, which has 35,660 digits. The keypad converts the result to a 50-significant-digit decimal and rounds it for display, using scientific notation for large values. Non-integer arguments use the gamma function, so 0.5! = √π/2 ≈ 0.886227.

Sources

  1. OpenStax Prealgebra 2e — Use the language of algebra (order of operations)
  2. NIST Digital Library of Mathematical Functions — Chapter 4, Elementary functions
  3. decimal.js arbitrary-precision arithmetic (50 significant digits)

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.