Skip to the content

Scientific Calculator

A calculator with brackets, powers, roots, trigonometry and logarithms.

Press Enter to keep a result. Decimals take a point; a comma separates the values in a function, as in max(2, 5).

Result, angles in degrees

5

Typed only: sqrt, cbrt, abs, exp, log2, sinh, cosh, tanh, round, floor, ceil, min, max, mod.

History

Results you keep with Enter or = are listed here. Ans stands for the latest one.

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

The order in which a line is worked out

The calculator reads the whole line before it does anything, then works from the tightest binding to the loosest.

OrderWhatExample
1Brackets and functions2 × (3 + 4) = 14
2Factorial and percent, written after a value2 × 3! = 12, 50% = 0.5
3Powers, from right to left2^3^2 = 2^9 = 512
4The minus sign of a negative number-2^2 = −4
5Multiplication and division, from left to right8 ÷ 4 × 2 = 4
6Addition and subtraction, from left to right10 - 4 - 3 = 3

Four of these catch people out.

-2^2 is −4. The power comes before the sign, as in written mathematics, where −x² means −(x²). For the square of minus two, write (-2)^2. Excel does it the other way round and answers 4.

2^3^2 is 512. A tower of powers is worked from the top down: 3² = 9 first, then 2⁹. Brackets give the other reading: (2^3)^2 = 64.

A missing times sign is an ordinary times sign. 2pi, 3(4 + 1) and 2sin(30) all work, but they have the same rank as a written ×. So 1/2pi is half of π, 1.57079632679. One divided by 2π has to be written 1/(2pi), which is 0.159154943092.

% only divides by a hundred. 200 + 10% is 200.1, not 220. Adding ten percent is 200 × 110%. With that in mind, percentages are handy in formulas: 1,500 at 4% interest for ten years is 1500 × (1 + 4%)^10 = 2220.36642738. For everyday percentage questions there is the percentage calculator.

Functions and constants

WriteMeaningExample
sqrt(x), cbrt(x)Square root, cube rootsqrt(2.25) = 1.5, cbrt(-8) = −2
abs(x)The number without its signabs(-5) = 5
sin(x), cos(x), tan(x)Sine, cosine and tangent of an anglesin(30) = 0.5 in degrees
asin(x), acos(x), atan(x)The angle that belongs to a sine, cosine or tangentasin(0.5) = 30 in degrees
sinh(x), cosh(x), tanh(x)Hyperbolic functionssinh(1) = 1.17520119364
ln(x)Natural logarithm, base eln(e) = 1
log(x)Logarithm base 10log(1000) = 3
log2(x)Logarithm base 2log2(8) = 3
exp(x)e to the power xexp(1) = 2.71828182846
round(x), round(x, n)Nearest whole number, or n decimals. Halves go away from zeroround(-2.5) = −3, round(3.14159, 2) = 3.14
floor(x), ceil(x)The whole number below, the whole number abovefloor(-1.2) = −2, ceil(1.2) = 2
min(a, b, …), max(a, b, …)Smallest and largest of a listmax(4, 2, 8) = 8
mod(a, b)Remainder of a ÷ b, with the sign of bmod(17, 5) = 2, mod(-7, 3) = 2
pi or π, e3.14159265359 and 2.718281828462pi × 6.5 = 40.8407044967
AnsThe last result you keptAns × 2

Capitals make no difference. A number such as 1.5e-3 is scientific notation for 1.5 × 10⁻³, so 2e3 is 2000. On its own, or with a space or a sign in between, e is the constant: 2 e and 2×e are both 5.43656365692.

Degrees or radians

A full turn is 360 degrees or 2π radians. The switch above the input decides how sin, cos and tan read their angle, and in which unit asin, acos and atan answer. The hyperbolic functions ignore it.

A trigonometry answer that looks far off usually comes from the wrong setting: sin(30) is 0.5 in degrees and −0.988031624093 in radians. School geometry is almost always in degrees. Calculus and physics formulas with π in them expect radians.

How precise the answers are

Numbers are stored as IEEE 754 double-precision values, the format nearly all software uses. It holds 15 to 17 significant digits. The calculator shows 12 of them.

Most decimal fractions cannot be stored exactly in binary, which is why 0.1 + 0.2 comes out as 0.30000000000000004 in many programs. Here, a result that lands within a few units in the last stored digit of a short decimal is taken to be that decimal. That gives 0.3 for 0.1 + 0.2, and 0 for sin(180) in degrees and for sin(pi) in radians.

The limits of the format still apply. The largest number is about 1.8 × 10³⁰⁸, so factorials stop at 170!. Whole numbers are exact up to 2⁵³, which is 9,007,199,254,740,992. Beyond that, neighbouring whole numbers can no longer be told apart, and adding 1 to 2⁵³ changes nothing.

See all 9