Frequently Asked Questions
Why did my trig function give an unexpected negative number?
Check whether the Angle Unit selector is set to Degrees (DEG) or Radians (RAD). For example, cos(60) is +0.5 in Degrees, but −0.9524 in Radians.
Why does -2^2 come out as 4 here?
This parser applies a leading minus sign to the number first and then takes the power, so it reads -2^2 as (-2) squared. Most textbooks and many handheld calculators treat it as the negative of 2 squared, which is negative 4. To get that answer, type -(2^2) or 0-2^2. The same issue makes -3! an error, so write -(3!) for negative 6.
Is log base 10 or the natural log?
log is base 10, and so is log10. log(100) returns 2 and log10(0.01) returns negative 2. The natural logarithm is ln, so ln(e) is 1 and exp(ln(7)) gives back 7. There is no function for an arbitrary base, but you can divide: the log of 8 in base 2 is log(8)/log(2), which returns 3.
Can I use the % key to take a percentage?
No. The % sign is a remainder operator here, the same as the modulo in most programming languages. 17 % 5 returns 2 and 10/3%1 returns the fractional part, 0.33333333. Typing 50% alone is an error because the parser expects a second number after the sign. For 15 percent of 120, type 0.15*120, which returns 18.
Why does sin(pi/6) give 0.0091384 instead of 0.5?
The angle unit is still set to degrees. In degree mode the argument is treated as degrees, and pi/6 is only about 0.52, so you are taking the sine of roughly half a degree. Switch the selector to radians and sin(pi/6) returns 0.5. Alternatively, stay in degrees and type sin(30). Do not mix pi with degree mode.
Do I need the multiplication sign between a number and a bracket?
Yes. The parser has no implied multiplication, so 2(3), 2pi and 4sqrt(9) all return the invalid expression message. Type 2*(3), 2*pi and 4*sqrt(9) instead. The × and ÷ symbols from a phone keyboard or a pasted document are accepted and converted to * and / before the expression is read.
Why does the scientific notation line show a tiny number when the result is 0?
The headline is rounded to eight decimal places but the scientific line is built from the unrounded value. cos(90) in degrees is mathematically 0, yet floating-point arithmetic produces about 6.1232e-17. The headline rounds that away and the scientific line does not. Trust the 0. Only when a result is genuinely tiny, like 1e-9, is the scientific line the correct reading.
What does tan(90) return in degree mode?
It returns a very large finite number, about 1.6e16, rather than an error. The tangent of 90 degrees is undefined, but pi over 2 cannot be stored exactly in binary, so the cosine underneath is a tiny nonzero value instead of zero. Any enormous tan result close to 90 degrees or an odd multiple of it should be read as undefined.
Can it calculate factorials of decimals such as 2.5?
No. The factorial works only for whole numbers from 0 to 170 inclusive, and 2.5! returns the invalid expression message. The calculator does not use the gamma function that extends factorials to fractions. For negative whole numbers the factorial is also rejected. If you need gamma values, use a statistics package or a dedicated special function tool.
What does the letter x mean if I type it in the main expression?
In the main box x is quietly replaced by 1, so x^2 + 3 returns 4 and sin(x) in degree mode gives the sine of one degree, 0.01745241. The variable is meant for the f(x) plot field, where it runs from negative 10 to 10. To evaluate a function at a particular point, type the number in place of x.
Does the plot use my degree or radian setting?
Always radians. The angle selector affects only the main expression. The plot field samples x at eleven whole numbers from negative 10 to 10 and treats each as radians, which is why the chart subtitle mentions radians. A function like sin(x) is therefore drawn over about three full cycles but with only eleven bars, so its shape is coarse.
How do I check an answer that looks wrong?
Split it into parts. Evaluate each function call on its own, then combine them with brackets that make your intended order explicit. Check the angle unit, check for a leading minus before a power, and make sure every multiplication has a sign. If a part returns the invalid message, that part is either outside a function's domain or has a typing error.
How the default expression reaches 133
Out of the box the expression box holds 2 * sin(30) + sqrt(144) + 5! with the angle unit set to degrees. The answer is 133, shown again as 1.3300e+2 in scientific notation, with 133 as the nearest integer and Degrees listed as the trigonometric mode.
Each piece is evaluated before the additions happen. sin(30) in degrees is 0.5, and doubling it gives 1. The square root of 144 is 12. Then 5! is 5 times 4 times 3 times 2 times 1, which is 120. Adding 1, 12 and 120 gives 133.
That one line exercises most of what the calculator knows: a function with an angle argument, a root, a postfix factorial, multiplication and addition. Switch the angle unit to radians and the same text gives a different answer, because sin(30) now means the sine of 30 radians, roughly negative 0.988. The total drops by just under three. Nothing else in the expression changes. That is the quickest way to see that the angle setting reaches only the trig functions.
Operator precedence as this parser applies it
The evaluator is a small recursive-descent parser, so the order of operations is fixed by how its levels nest. Parentheses come first. Then come numbers, constants and function calls. Then factorial and power, then multiply, divide and the % sign, and finally addition and subtraction.
Multiplication and division run left to right at the same level. 10/4*2 is 5, not 1.25. Subtraction does the same, so 2-3-4 gives negative 5.
Power is right-associative. 4^0.5^2 is read as 4 raised to the power 0.25, which is about 1.414214, while (4^0.5)^2 is 4. If you mean the second, write the brackets.
Factorial is applied before a power on the same number. 3!^2 is 36 because 3! becomes 6 and then 6 is squared. 2^3! is 64, since the exponent 3! is 6. A double factorial typed as 3!! applies the factorial twice, which is what the parser does, not the odd-number product that some textbooks mean by that notation.
One rule differs from most textbooks. A leading minus sign binds to the number before the power is taken, so -2^2 returns 4 rather than negative 4. Typing -(2^2) or 0-2^2 gives negative 4. The same thing happens with factorials: -3! is treated as the factorial of negative 3, which is undefined, so the page reports an invalid expression. Write -(3!) to get negative 6.
Every function name the parser recognises
The list is short, and anything outside it returns an error. The trig functions are sin, cos and tan, with the inverses asin, acos and atan. For roots there are sqrt and cbrt. Logarithms are ln for the natural log and log or log10 for base 10. exp raises e to a power, abs gives the absolute value, and fact(n) is the same as n!.
Names are not case sensitive, so SIN(30) and LOG(100) work and give 0.5 and 2. Two constants are built in: pi (or the π symbol) and e. The multiplication and division signs × and ÷ and the long minus sign are converted to *, / and - before parsing, so pasting from a document usually works.
Domains are checked. sqrt of a negative number, ln(0), log of a negative number and acos(2) all produce the invalid expression message rather than a complex number. cbrt is the exception among the roots: cbrt(-27) is negative 3, because a real cube root exists. Division by zero is caught too, and so is a remainder by zero such as 5%0.
The % sign is a remainder operator, not a percentage. 17 % 5 gives 2. Typing 50% on its own is an error because the parser waits for a second number after the sign. For percentages, divide by 100 yourself or use the dedicated percentage calculator.
Degree mode, radian mode and the inverse functions
In degree mode the argument of sin, cos and tan is multiplied by pi over 180 before the sine is taken. In radian mode it is passed straight through. The inverse functions work the other way round: asin, acos and atan return their answer in whichever unit is selected. asin(0.5) shows 30 in degrees and 0.52359878 in radians. acos(-1) gives 180 in degree mode, and atan(1)*4 in radian mode reproduces pi to eight places.
The classic slip is mixing the two. sin(pi/6) is 0.5 in radian mode, because pi/6 radians is 30 degrees. Leave the selector on degrees and the same expression gives 0.0091384, which is the sine of about half a degree. If an answer looks far too small, check whether you typed a radian expression while the page was set to degrees.
Values that should be exactly zero are cleaned up. In degree mode cos(90) shows 0 and sin(180) shows 0, because the result is rounded to eight decimal places. tan(90) is not caught, though. It returns a very large finite number, about 1.6e16, instead of saying the tangent is undefined there. Treat any huge tan result near 90 degrees, or any odd multiple of it, as a sign that you are sitting on an asymptote.
Typing habits the parser rejects or forgives
There is no implied multiplication. 2pi, 2(3) and 3sin(30) are all errors; write 2*pi, 2*(3) and 3*sin(30). Functions need their brackets too. Spaces are stripped before parsing, so sin 30 turns into sin30, which is read as an unknown name and fails.
Scientific notation in numbers is accepted. 2e3 is read as two thousand and 1e-9 is read correctly as one billionth. The letter e on its own is Euler's number, so e^2 gives 7.3890561 and ln(e) gives 1.
A missing closing bracket at the very end is forgiven. sqrt(144 returns 12 and (2+3 returns 5, because the parser simply runs out of text. A stray bracket or symbol in the middle is not forgiven, and the result card switches to the invalid expression message.
Two subtler cases. An empty box does not give zero; the page falls back to the default expression and shows 133 again. And the letter x is allowed in the main expression, where it silently stands for 1, so sin(x) in degree mode returns the sine of one degree. That x belongs to the plot field, so avoid it in the expression box.
The four result lines and their rounding
The headline value is rounded to eight decimal places. That is why 1/3 shows 0.33333333 and 0.1+0.2 shows a clean 0.3 instead of the binary floating-point tail. Standard Decimal repeats the value at six places, so 1/7 appears as 0.14285714 on top and 0.142857 below it.
Scientific Notation is built from the unrounded number with four digits after the point. Most of the time it agrees with the headline. Near zero it does not: cos(90) in degree mode shows 0 at the top but 6.1232e-17 in the scientific line, and sin(pi) in radians shows 0 above 1.2246e-16. Those tiny figures are rounding noise, not a real answer, and the 0 is the one to trust.
The same rounding hides genuinely small results. 1e-9 shows 0 as the headline and 0 as the decimal, and only the scientific line reveals 1.0000e-9. If you work with very small quantities, read the scientific line.
Nearest Integer uses ordinary rounding, so pi rounds to 3, e rounds to 3, and 2^-1, which is 0.5, rounds up to 1.
Factorials and very large numbers
The factorial accepts only whole numbers from 0 up to 170, inclusive. fact(0) is 1, 5!/3! is 20, and 2.5! is rejected because the calculator does not use the gamma function for fractional arguments. The next whole number past the limit is rejected as well, since its factorial overflows double precision.
Up to about 20! the answer prints as a full string of digits. Beyond that the display switches to exponent form, for example 1.5511210043330986e+25 for 25!, which is the value with about sixteen significant digits. The last digits of large factorials are not exact, because a double cannot hold every digit.
At the very top of the range the headline breaks. 170! is a finite number with more than three hundred digits, but the page shows Infinity, because the eight-place rounding multiplies the value by a large power of ten and overflows. The page description says factorials up to 170 work, and the scientific line is where the real magnitude would appear. If you need factorials that large, a logarithm of the factorial is the safer route.
Ordinary big powers are fine. 2^10 is 1024, and 10^19 prints as a one followed by nineteen zeros.
What the f(x) plot preview actually draws
The second text box takes a function of x, x^2 - 4 by default, and draws it as a bar chart rather than a smooth curve. It samples only eleven points: x equals negative 10, negative 8 and so on in steps of 2 up to 10. For x^2 - 4 that means bars at 96, 60, 32, 12, 0, negative 4, 0, 12, 32, 60 and 96. The two roots at plus and minus 2 appear only because they happen to be sample points.
The plot always works in radians, whatever the angle selector says. sin(x) * x is drawn with x in radians even in degree mode, and the chart subtitle says so. With samples two units apart, a sine wave of period about 6.28 is badly undersampled, so expect a jagged shape.
Points where the function is undefined, such as sqrt(x) for negative x or 1/x at zero, are drawn as 0 rather than left blank. A flat run of zeros in the preview can therefore mean the function is not defined there. Use the preview to sanity check the shape of a function. For roots, turning points or anything between the sample points, evaluate the expression directly in the top box.