Scientific Calculator

Type a calculation on each line and see every answer beside it, using powers, brackets, factorials, trigonometry, logarithms and constants. It is free, shows errors line by line and runs in your browser with no sign-up, so your sums stay on your device.

Scientific CalculatorPrivate · runs on your device
Input
Words 0Characters 0Lines 0
Results

Example: 2 * (3 + 4)^2 sqrt(144) + 5! → 98 132

How to use the scientific calculator

Instead of tapping keys, you write expressions the way they appear in a textbook and the answers appear on the right.

  1. Type one calculation per line in the input box, for example 2 * (3 + 4)^2. The result appears beside it in the form expression = result.
  2. Choose Angles in: Degrees or Radians. This affects sin, cos, tan and their inverses only.
  3. Set Decimal places from 0 to 12. The default is 8, and long decimals are rounded for display.
  4. Write ans on a later line to reuse the result of the line above, so ans / 4 divides the previous answer by four.
  5. Read the note under the box, which counts the lines calculated and any with errors. A bad line shows its own message and the lines around it still work.

Blank lines are left blank, so you can space your working out into groups. Brackets can be nested as deeply as you need, and spaces around operators are optional.

Multiplication, division, minus and pi can also be typed as ×, ÷, − and π.

Operators, precedence and constants

The parser follows the usual order of operations: brackets first, then powers, then multiplication and division, then addition and subtraction. Three details catch people out. A power is worked right to left, so 2^3^2 is 2 to the power 9, which is 512. A minus sign binds more loosely than a power, so -2^2 is -4, and (-2)^2 is 4. The factorial sign ! and the percent sign % follow the number they apply to.

InputResultNote
2 * (3 + 4)^2987 squared is 49, times 2
sqrt(144) + 5!13212 plus 120
sin(30)0.5in Degrees mode
sin(pi/2)1in Radians mode
ln(e^3)3natural log undoes e to a power
mod(-7, 3)2result takes the sign of the divisor

Built-in constants are pi, e, tau (2 pi) and phi (the golden ratio).

Functions available

Every function needs brackets, and functions with two inputs separate them with a comma.

  • Trigonometry: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, plus rad and deg to convert between the two angle units.
  • Roots and logs: sqrt, cbrt, ln (natural), log (base 10), log2 and exp.
  • Rounding and sign: abs, floor, ceil, round, trunc and sign.
  • Two or more inputs: pow(a, b), mod(a, b), min, max and hypot.
  • Factorial: fact(n) or n!, for whole numbers from 0 to 170.

For quick fractions rather than decimals use the fraction calculator, and for a list of values the average calculator is faster than typing a long sum.

Percentages, rounding noise and limits

The percent sign only divides by 100, so 50% is 0.5 and 100 + 10% is 100.1, not 110. To add ten percent write 100 * 1.1, or use the percentage calculator. There is also no remainder operator, so write mod(10, 3) instead of 10 % 3.

Computers store decimals in binary, so tiny errors appear in the background. Results are tidied before display, which is why 0.1 + 0.2 shows 0.3. Sine and cosine results that should be exactly zero, such as sin(180) in degrees, are snapped to 0, and tan(90) is reported as undefined. Very large results switch to exponent form, and 2^100 shows 1.2676506e+30 at 8 places.

  • There is no implicit multiplication, so write 2*pi, not 2pi.
  • The only name you can define is ans; there are no other variables.
  • Complex numbers are not supported, so sqrt(-4) returns an error.
  • Factorials above 170 and divisions by zero are reported as errors on their own line.

Errors are shown beside the line that caused them, for example a missing closing bracket, an unknown name or a logarithm of zero, and the remaining lines keep calculating. That makes it practical to build a small worksheet: put one sum on each line, fix the one that fails and carry on. The calculator is meant for everyday and school-level arithmetic, and it is not a replacement for a computer algebra system or for software that needs exact symbolic results.

To view results in another number system, send whole numbers to the number base converter.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

Does the scientific calculator use degrees or radians?

You choose. The Angles in setting offers Degrees or Radians and applies to sin, cos, tan, asin, acos and atan. In degrees, sin(30) is 0.5. In radians, sin(pi/2) is 1. Other functions, such as logarithms and square roots, are not affected by the angle setting.

Why does 100 + 10% give 100.1 instead of 110?

The percent sign here only divides the number by 100, so 10% means 0.1 and the line becomes 100 + 0.1. To increase 100 by ten percent, write 100 * 1.1, which gives 110, or use a dedicated percentage calculator for increases and decreases.

Why does sin(180) show 0 and not a tiny number?

Computers cannot store pi exactly, so a raw sin(180) in degrees comes out near 1.2e-16 rather than zero. The calculator snaps sine and cosine results smaller than about one ten-trillionth to 0 and reports the tangent at 90 degrees as undefined. Other long calculations can still leave a tiny residue.

What does ans do in the scientific calculator?

Ans holds the result of the previous line that calculated successfully. Type ans / 4 on the next line to divide that answer by four, or ans + 10 to add ten. It starts at 0, and a line with an error leaves the earlier value in place.

Can I write 2pi or use my own variables?

No. Multiplication must be written out, so type 2*pi instead of 2pi, and brackets next to numbers need a sign, as in 3*(4+5). Apart from ans and the constants pi, e, tau and phi, no variables can be defined, and complex numbers are not supported.