CALCULATORCASTLE

Scientific Calculator

Full-featured scientific calculator with trigonometry, logarithms and more.

About

Scientific Calculator

This scientific calculator evaluates a whole expression at once rather than one keystroke at a time, and it follows the standard order of operations. Type 2+3*4 and it returns 14, not 20, because multiplication is applied before addition. You can type directly into the input, press Enter to evaluate, or build the expression with the buttons. It handles trigonometry, logarithms, exponents, roots, factorials, and the constants pi and e.

Order of operations, and why the answer differs from a basic calculator

The rule this calculator follows is the standard one: brackets first, then exponents, then multiplication and division left to right, then addition and subtraction left to right. Most people learn it as PEMDAS or BODMAS.

That single rule explains the most common surprise in online calculators. Enter 2 + 3 × 4 here and you get 14. Enter the same keystrokes into a simple four-function calculator, including our own Basic Calculator, and you get 20, because that kind of calculator resolves each operation the moment you press the next operator. Neither is broken. They implement different conventions, and knowing which one you are using matters more than knowing either rule.

Brackets override everything, so type them whenever the grouping matters rather than trusting precedence to work out. (2+3)*4 gives 20, unambiguously.

Angles are in radians

Every trigonometric function here takes radians, not degrees. This trips up more people than any other feature, because sin(30) looks like it should give 0.5 and instead returns about -0.988. That is the sine of 30 radians, which is nearly five full turns around the circle.

To work in degrees, multiply by pi over 180. Type sin(30*PI/180) and you get 0.5. Going the other way, multiply radians by 180 over pi. It is worth memorising the three conversions you will actually use: 90 degrees is pi/2, 180 degrees is pi, and 360 degrees is 2*pi.

The inverse functions run the same way in reverse. asin, acos, and atan return radians, so atan(1) gives about 0.785, which is pi/4, or 45 degrees once you multiply by 180/pi.

log against ln

These two get mixed up constantly, and they are not interchangeable. log here is base 10, so log(100) returns 2 because 10 squared is 100. ln is the natural logarithm, base e, so ln(e) returns 1.

Which one you need depends on the field. Base 10 is what pH, decibels, and the Richter scale use. Natural log is what appears in continuous growth and decay, compound interest derivations, and most of calculus. Getting them backwards produces an answer that is wrong by a factor of about 2.303, which is ln(10), and that factor is also how you convert between them: log(x) equals ln(x)/ln(10).

For a logarithm in some other base, divide. Log base 2 of 32 is ln(32)/ln(2), which returns 5.

Exponents, roots, and the minus sign

Use ^ for powers, so 3^2 is 9. Stacked exponents evaluate right to left, which is the mathematical convention: 2^3^2 is 2 to the power of 9, or 512, not 8 squared.

Negative exponents give reciprocals, so 2^-3 is 0.125. Fractional exponents give roots, which is the trick worth knowing: there is no dedicated cube-root button, but 27^(1/3) returns 3, and the same pattern gives any nth root. For square roots specifically, sqrt(16) is more readable and returns 4.

One detail that catches people out even on physical calculators: a minus sign in front of a power applies after the power. -3^2 is -9, because it reads as the negative of 3 squared. If you want the square of negative three, bracket it: (-3)^2 returns 9. This calculator follows the standard convention on both.

Factorials and constants

The ! key gives factorials, the product of every whole number up to the one you enter. 5! is 120, from 5 x 4 x 3 x 2 x 1. Factorials grow violently: 10! is already 3,628,800, and beyond about 170! the result exceeds what a browser can represent and returns infinity. They turn up mainly in probability and combinatorics, where they count arrangements.

Two constants are built in. Type PI or press the pi button for 3.14159 and so on, and e for 2.71828, the base of natural logarithms. Both carry full double precision, so you never need to type an approximation like 3.14.

Precision and why some answers look odd

This calculator uses standard double-precision floating point, the same arithmetic behind almost every computer and phone calculator. It carries about 15 to 17 significant digits, which is far more than most work needs, but it cannot represent every decimal fraction exactly.

The classic demonstration is that 0.1 + 0.2 is not exactly 0.3 in binary floating point; it comes out as 0.30000000000000004. Results here are displayed to 10 decimal places, which rounds that away and shows 0.3, so you will rarely see the artefact. It is worth knowing it exists if you ever chain many operations and a final digit looks wrong.

Very large and very small results switch to scientific notation, where 1.5e+21 means 1.5 times 10 to the 21st power. Division by zero returns Infinity rather than an error, and genuinely undefined operations such as the square root of a negative number return Error.

Typing instead of clicking

The fastest way to use this calculator is to ignore the buttons. The input accepts a full expression from your keyboard, Enter evaluates it, and you can click into the middle of the expression to fix a typo rather than clearing and starting again. That last part is the real advantage over a physical calculator, where a single mistyped digit usually means retyping the whole thing.

Function names are typed as they read: sin, cos, tan, asin, acos, atan, sqrt, log, ln, abs, and exp. The buttons insert the name with its opening bracket already in place, which saves a keystroke and prevents the commonest syntax error.

Four mistakes that produce a wrong answer

Most bad results from a scientific calculator come from four causes, and three of them fail silently rather than showing an error.

  • Implicit multiplication is not supported. Writing 2(3+4) the way you would on paper returns 2, not 14, because the calculator reads the 2 and then stops. There is no error message. Always type the operator: 2*(3+4). This is the single most likely way to get a confidently wrong number here.
  • Degrees entered as radians. sin(30) returns about -0.988 rather than 0.5. Multiply by PI/180 whenever your angle is in degrees.
  • log used where ln belongs. The two differ by a factor of about 2.303, which is large enough to look plausible and small enough to slip past a sanity check.
  • Brackets that do not close. A missing closing bracket at the very end is forgiven, so sqrt(16 still returns 4, but a bracket left open in the middle of an expression changes the grouping and the result.

The habit that prevents all four is estimating the answer before you press equals. If you expect roughly 14 and see 2, you catch the error immediately; if you have no expectation, any number looks reasonable.

When you want a different calculator

A scientific calculator is the right tool for evaluating an expression you already know. It is the wrong tool for a repeated formula with named inputs, which is what the rest of this site is for. Compound growth is easier in the Compound Interest Calculator than as a hand-typed power, percentage problems are quicker in the Percentage Calculator, and fraction arithmetic stays exact in the Fraction Calculator instead of being converted to decimals and rounded.

Common questions

Frequently asked questions

Yes. It applies brackets first, then exponents, then multiplication and division left to right, then addition and subtraction. So 2+3*4 returns 14, not 20. A basic four-function calculator gives 20 because it resolves each operation as you press the next operator.

Because the trigonometric functions take radians, not degrees. sin(30) is the sine of 30 radians, roughly -0.988. For degrees, multiply by pi over 180: sin(30*PI/180) returns 0.5. The inverse functions return radians too, so multiply their output by 180/PI to read degrees.

log is base 10, so log(100) is 2. ln is the natural logarithm, base e, so ln(e) is 1. Base 10 is used for pH, decibels, and earthquake magnitude; natural log appears in growth, decay, and calculus. For any other base, divide: log base 2 of 32 is ln(32)/ln(2), which is 5.

Use a fractional exponent. 27^(1/3) returns 3, and the same pattern gives any nth root, so the fifth root of 32 is 32^(1/5). There is a dedicated sqrt function for square roots, where sqrt(16) returns 4.

It is -9. A minus sign in front of a power applies after the power, so the expression reads as the negative of 3 squared. To square negative three, bracket it: (-3)^2 returns 9. This calculator follows the standard convention on both forms.

It calculates a factorial, the product of every whole number up to the one entered. 5! is 120, from 5 x 4 x 3 x 2 x 1. Factorials grow extremely fast: 10! is 3,628,800, and past roughly 170! the result exceeds what the browser can represent and returns infinity.

Because binary floating point cannot represent every decimal fraction exactly, so 0.1 + 0.2 is stored as 0.30000000000000004. This calculator displays 10 decimal places, which rounds it to 0.3. Every mainstream computer and phone calculator shares this behaviour.

Because implicit multiplication is not supported, and it fails silently rather than showing an error. The calculator reads the 2 and stops at the bracket. Always type the operator: 2*(3+4) returns 14. This is the most likely way to get a confidently wrong answer here, so estimate your result before pressing equals.