Scientific Calculator
Most wrong answers from a scientific calculator come from the settings, not the arithmetic. If sin(30) gives −0.988031624093 instead of 0.5, the angle mode is set to RAD; if you pressed e to type 1.5e8, you multiplied by Euler's number (2.71828…) rather than entering exponent notation. This is an expression calculator: you type the whole expression, press =, and it is evaluated in one go with brackets and operator precedence respected. It supports trigonometric and inverse trigonometric functions, common and natural logarithms, powers, square roots, and the constants π and e. Below is a complete list of what it can do, along with the actual outputs at the points where results tend to look surprising.
Key points
- It evaluates expressions with precedence, so 2+3×4 gives 14. Leaving out the multiplication sign, as in 2π or 2(3+4), still means multiply, and any brackets left open are closed automatically at the very end of the expression when you press =.
- The angle mode starts in DEG (degrees). asin, acos, and atan also return results in the current mode's unit, and if you switch modes and press = again, the same expression is recalculated in the new mode.
- Results are rounded to 12 significant digits. That makes 0.1+0.2 come out as 0.3, and the leftover error below 10⁻¹² that trig functions pick up from the approximation of π is cleaned to zero, so cos(90) shows 0. Undefined values such as tan(90) show 'Error'.
Examples
What angle is a 1:12 ramp? — atan
A rise of 1 over a horizontal run of 12 is a slope often used in accessibility guidelines. To turn it into an angle, calculate atan(1÷12) in DEG mode: 4.76364169073, or about 4.8°. As a percentage the same slope is 1÷12×100 = 8.33333333333, about 8.3%. Going the other way, an 8° slope is tan(8)×100 = 14.0540834702, about 14.1% — a quick demonstration that an '8% slope' and an '8° slope' are very different things.
Estimating a building's height — tan and automatic bracket closing
You stand 20 m from a building, the angle up to the top is 32°, and your eyes are 1.6 m above the ground, so the height is 1.6 + 20 × tan(32°). In DEG mode, type only 1.6+20×tan(32 and press =: the closing bracket is added for you and the result is 14.0973870382, about 14.1 m. Typing 20tan(32 without the × works too. Bear in mind that automatic closing always happens at the very end, so sin(30+sin(60 is read as sin(30+sin(60)) and gives 0.513032356288. If more terms follow a function, close its bracket yourself.
A monitor's diagonal — √, ^, and continuing from a result
For a screen 59.8 cm wide and 33.6 cm high, Pythagoras gives the diagonal as √(59.8^2+33.6^2) = 68.5930025586 cm. Type ÷2.54 straight after that and press =, and the calculation continues from the previous result: 27.0051191176, confirming a 27-inch monitor. There is no separate x² key, so enter squares as ^2, and enter roots such as cube roots as fractional powers, for example 8^(1÷3) = 2; the cube root of a negative number works too, so (−8)^(1÷3) = −2.
How long until money doubles at 5% a year? — ln
Solving 1.05ⁿ = 2 for n gives n = ln(2)÷ln(1.05), which comes to 14.2066990829 years — very close to the familiar rule of 72 (72÷5 = 14.4 years). Going the other way, 1.05^10 = 1.62889462678 tells you that after 10 years the balance is about 1.63 times the original. Using log instead, log(2)÷log(1.05), gives the same 14.2066990829, because the ratio of two logarithms does not depend on their base.
sin(30) as 0.5 and as −0.988 — catching a mode mistake
In DEG mode sin(30) is 0.5, but in RAD mode the 30 is read as 30 radians (about 1,718.9°) and the result is −0.988031624093. To get the sine of 30° in RAD mode, enter sin(π÷6) or sin(30×π÷180); both return 0.5. The inverse functions behave the same way: asin(0.5) is 30 in DEG and 0.523598775598 (π/6) in RAD. If a result looks wrong, leave the expression alone, switch the mode, and press = again to compare the two answers.
Trig values for common angles, and what this calculator shows
| Angle | Radians | sin | cos | tan |
|---|---|---|---|---|
| 0° | 0 | 0 | 1 | 0 |
| 30° | π/6 | 1/2 → 0.5 | √3/2 → 0.866025403784 | √3/3 → 0.57735026919 |
| 45° | π/4 | √2/2 → 0.707106781187 | √2/2 → 0.707106781187 | 1 |
| 60° | π/3 | √3/2 → 0.866025403784 | 1/2 → 0.5 | √3 → 1.73205080757 |
| 90° | π/2 | 1 | 0 | Undefined (shown: Error) |
| 180° | π | 0 | −1 | 0 |
Values after the arrow are what this calculator actually displays in DEG mode. Because floating-point arithmetic can only hold π to a finite number of digits, computing 90° and 180° directly leaves values around 10⁻¹⁶ where there should be zero; this calculator cleans such trig leftovers (below 10⁻¹²) to 0 and shows the undefined tan(90°) as 'Error'.
Supported keys and how to enter them
| Key | What it does | Example → result |
|---|---|---|
| sin( cos( tan( | Trigonometric functions (angle unit follows DEG/RAD) | sin(30 → 0.5 (DEG) |
| asin( acos( atan( | Inverse trig functions (result in the current mode's unit) | acos(0.5 → 60 (DEG) |
| log( | Common logarithm (base 10) | log(1000 → 3 |
| ln( | Natural logarithm (base e) | ln(e → 1 |
| √( | Square root | √(2 → 1.41421356237 |
| ^ | Power (evaluated right to left) | 2^3^2 → 512 |
| π, e | Pi and Euler's number | 2π → 6.28318530718 |
| ( ) | Brackets (closed automatically at the end if left open) | 2(3+4) → 14 |
| % | Divides the preceding number by 100 | 200×10% → 20 |
| ⌫, C | Delete last entry, clear all | Same as Backspace and Escape |
From the keyboard you can use digits, + - * / ^ ( ) . %, Enter (=), Backspace (⌫), and Escape (C); functions, π, and e are entered with the on-screen buttons only. There are no keys for x², 1/x, n!, combinations (nCr), hyperbolic functions, memory (M+), or exponent entry (EXP).
FAQ
Other calculators show cos(90) as 6.12e-17. Why does this one show 0?
6.12323399574e-17 is floating-point error. In DEG mode, 90 is converted internally to π/2 radians, but π itself is stored as an approximation with a finite number of digits, so the result cannot land exactly on zero and a tiny 6.12 × 10⁻¹⁷ is left over. Rounding to 12 significant digits cannot remove a number like that, because it works on significant digits rather than decimal places, so when the angle is not near zero but sin, cos, or tan comes out smaller than 10⁻¹², this calculator treats it as error from π and shows 0. That is why sin(180), tan(180), and sin(π) in RAD mode are also 0. The undefined tan(90) shows 'Error' rather than a huge number, as do tan(270) and tan(π÷2) in RAD mode. The clean-up applies only to trig results, so a small number from any other calculation, such as 10^−15, is still shown as 1e-15.
I typed 1.5e8 to mean 1.5×10⁸ and got a strange answer
The e button on this calculator is Euler's number (2.71828182846), not an exponent-entry key. Pressing 1.5, then e, then 8 triggers implicit multiplication, so you get 1.5 × e × 8 = 32.6193819415. Enter 1.5×10⁸ as 1.5×10^8, which gives 150000000. Conversely, when a result such as 1.18059162072e+21 contains an e, that is exponent notation meaning × 10²¹, and pressing an operator after it carries the value forward into the next calculation.
Why does −2^2 give −4 rather than 4?
Powers are evaluated before the sign (unary minus), so −2^2 is read as −(2^2) = −4, which matches the usual mathematical convention. To square a negative number, wrap it in brackets: (−2)^2 gives 4. A negative exponent needs no brackets, so 2^−3 = 0.125. A negative base with a fractional exponent returns the real root when the exponent is one over an odd number, such as 1÷3 or 1÷5: (−8)^(1÷3) = −2 and (−32)^(1÷5) = −2. Other fractional exponents, such as (−8)^(2÷3), and even roots such as (−4)^(1÷2) return an error; if you need one, split it up, as in ((−8)^(1÷3))^2 = 4.
How do I take a logarithm in a base other than 10 or e, such as base 2?
Use the change-of-base rule, logₐ(x) = log(x) ÷ log(a). For base 2, log₂(1024) is log(1024)÷log(2) = 10 and log₂(8) is log(8)÷log(2) = 3; ln(1024)÷ln(2) gives the same answer. There are no dedicated eˣ or 10ˣ keys either, but ^ covers them: e^2 = 7.38905609893 and 10^0.5 = 3.16227766017. Feeding in a value where the logarithm is undefined, such as log(0) or ln(−1), shows 'Error'.
Can I carry on from a result, or edit the expression I just ran?
Yes. After pressing =, pressing an operator such as + − × ÷ ^ or % continues from the previous result, while pressing a digit, the decimal point, an opening bracket, a function, π, or e starts a new expression. The expression you just ran stays on the upper line, so you can trim its end with ⌫, fix it, and press = again; switching the angle mode and pressing = recalculates the same expression in the new mode. Note that − straight after a result is treated as subtraction, so to start a new expression with a negative number, clear with C first.
Angle modes and the usual trigonometry traps
A degree is 1/360 of a full turn, while a radian is the angle made by an arc as long as the radius, so a full turn is 2π radians. That gives radians = degrees × π ÷ 180, and one radian is 180÷π = 57.2957795131°. On this calculator, 30×π÷180 returns 0.523598775598, which is 30° expressed in radians.
Angles you could measure with a protractor — in surveying, construction, or technical drawings — are usually given in degrees, so use DEG mode. In calculus and physics, where angles appear mixed with time or length as in sin(ωt), or whenever a problem gives an angle with π in it, radians are the default and you should switch to RAD mode. If textbook answers keep failing to match, check the mode first.
Inverse trig functions have fixed output ranges. In DEG mode, asin and atan return values between −90° and 90°, and acos between 0° and 180°; giving asin or acos a value below −1 or above 1 shows 'Error'. atan also works only from the slope, so it cannot tell the point (1, 1) from (−1, −1): atan(−1÷−1) still returns 45, and when the real angle is 225° you need to look at the quadrant and add 180° yourself.
Values that should be zero coming out as tiny numbers around 10⁻¹⁶ are a feature of most software arithmetic. This calculator cleans them up for trig results only, which is why the 90° and 180° rows in the table above come out clean, but the same calculation in another program or in code may still show something like 6.12e-17. To check your input, try an identity whose exact answer you know. For example, sin(37)^2+cos(37)^2 returns 1, and checking against expressions like this is an easy way to catch typing mistakes.
Working with logarithms, powers, and exponent notation
log is the common logarithm (base 10) and ln the natural logarithm (base e). Because log(100) = 2 and log(1000) = 3, common logarithms map directly onto the number of digits and underpin scales such as decibels, pH, and earthquake magnitude; natural logarithms describe processes whose rate of change is proportional to their size, such as continuous compounding, population growth, and radioactive decay. The two are related by ln(x) = log(x) × 2.30258509299. Neither is defined for zero or negative numbers, so log(0) and ln(−1) show 'Error', and since complex numbers are not supported, √(−1) does too.
^ is evaluated from the right, so 2^3^2 is 2^(3^2) = 2^9 = 512; if you want (2^3)^2 = 64, add the brackets. A fractional exponent gives a root, so 2^0.5 = 1.41421356237, the same as √(2), and 3^(1÷2) = 1.73205080757. Fractional exponents must be bracketed, because 8^1÷3 is read as (8^1)÷3 = 2.66666666667.
Results are rounded to 12 significant digits and switch to exponent notation at 10²¹ and above or below 0.000001: 2^70 shows as 1.18059162072e+21, 2^−20 as 9.53674316406e-7, and 10^−7 as 1e-7. Large numbers between those limits are written out in full without separators, but from the 13th digit onward they are filled with zeros, so 2^60 appears as 1152921504610000000 instead of the exact 1152921504606846976. It is not the right tool when every last digit of a large integer matters.
Related Calculators
Calculator
An immediate-execution online calculator that completes each step as soon as you press an operator. Supports + − × ÷, %, ±, and keyboard input, with worked key sequences explaining the % key, how 0.1 + 0.2 is handled, 12-digit rounding, and how large numbers are shown.
Number Base Converter
Convert integers between binary, octal, decimal, and hexadecimal at once. Exact BigInt math with no digit limit, plus worked examples for color codes, chmod permissions, and two's complement.