On this page
Scientific Calculator
Trigonometry, logs, factorials and statistics with a zero-eval expression parser.
- Available — Live on this site right now.
- Browser Tool — Runs in the browser you are reading this in.
- No Install — Nothing to download, no extension, no account.
- Client-Side — Runs entirely on your device. No test data is uploaded.
This page explains the tool. The tool itself is one click away and needs no sign-in.
Open Scientific CalculatorWhat this calculator does
The Scientific Calculator evaluates full expressions with correct operator precedence rather than applying each key press immediately. It is built on its own tokenizer and recursive-descent parser — there is no use of JavaScript's eval anywhere — which is what lets it handle nested parentheses, implicit multiplication and postfix factorials safely.
SCIENTIFIC mode covers trigonometry (sin, cos, tan and their inverses), hyperbolic functions (sinh, cosh, tanh, asinh, acosh, atanh), logarithms (ln, log, log₂), exponentials, roots, absolute value, floor, ceiling, rounding, modulo, factorials, nPr and nCr. The built-in constants are π, e, τ and φ.
STATISTICS mode takes a dataset and returns count, sum, mean, median, modes, minimum, maximum, range, and both population and sample variance and standard deviation. Results can be displayed as a decimal, a fraction, or in scientific or engineering notation, and there is a full memory register (MS, MR, M+, M−, MC).
How to use it
- Set the angle mode before any trigonometryDEG, RAD and GRAD are not cosmetic — they change the answer. sin(90) is 1 in DEG and roughly 0.894 in RAD. Check the mode indicator before you trust a trigonometric result.
- Type or click the expressionYou can use the on-screen keys or your physical keyboard. The parser accepts nested parentheses, implicit multiplication such as 2(3+4), and a trailing ! for factorial.
- Use 2nd for the inverse functionsThe 2nd key switches the trigonometric keys to their inverses and exposes the secondary functions, in the same way as a physical scientific calculator.
- Choose how the answer is displayedDECIMAL, FRACTION, SCI and ENG reformat the same result. Scientific notation is shown with an explicit × 10^ exponent, and engineering notation keeps the exponent to a multiple of three.
- Switch to STATISTICS for a datasetEnter your values in the dataset input and the tool reports the full set of descriptive statistics at once, including both the population and the sample forms of variance and standard deviation.
- Use memory and copy the workingMS stores, MR recalls, M+ and M− accumulate, MC clears. COPY RESULT copies the answer, COPY EXPR copies the expression, and ★ SAVE keeps a calculation locally.
What the results mean
Operator precedence
Expressions follow standard precedence: parentheses, then functions and factorials, then exponentiation, then multiplication and division (with mod, nPr and nCr at the same level), then addition and subtraction. 2 + 3 × 4 is 14, not 20.
DEG, RAD and GRAD
Degrees split a full turn into 360, radians into 2π, and gradians into 400. The engine converts your input to radians internally — gradians via × π ÷ 200 — so the mode you choose is the mode your number is interpreted in.
Population versus sample statistics
Population variance divides by n; sample variance divides by n − 1. Use the population form when your data is the whole group, the sample form when it is a sample being used to estimate a larger group. Sample statistics are unavailable for a single data point, and the tool reports that rather than dividing by zero.
Fraction display
FRACTION attempts to express the result as an exact fraction. It succeeds for values that genuinely are rational with a manageable denominator and falls back to the decimal when they are not — there is no fraction for π.
Errors are specific
The parser reports what actually went wrong rather than a generic failure: a domain error for sqrt of a negative number or a factorial of a non-integer, an overflow for a factorial above 170, and an unknown-function error for an unrecognised name.
The formula
These are the expressions the calculator evaluates, written out so you can reproduce any result by hand.
Worked example
Two calculations that show why the angle mode and the precedence rules matter, plus a combinatorics check.
- Expression
- sin(30) + 2 × 3²
- In DEG
- sin(30) = 0.5, 3² = 9, 2 × 9 = 18 → 18.5
- In RAD
- sin(30) = −0.988 → 17.012
- Combinations
- 10 nCr 3 = 10! ÷ (3! × 7!) = 120
- Permutations
- 10 nPr 3 = 10! ÷ 7! = 720
- Dataset 2, 4, 4, 4, 5, 5, 7, 9
- mean 5, median 4.5, mode 4, population σ = 2, sample s ≈ 2.138
The same expression gives 18.5 in DEG and about 17.012 in RAD — the single most common source of a “wrong” trigonometric answer. The dataset shows why population and sample standard deviation are reported separately: 2 versus 2.138 from identical numbers.
Limits worth knowing
A browser can only report what the platform gives it. These are the honest boundaries of this page, so a result is never read as more than it is.
- It uses double-precision floating-point arithmetic, like every mainstream calculator and spreadsheet. That means 0.1 + 0.2 is not exactly 0.3 internally, and very large or very small magnitudes lose precision. The page's own FAQ raises this directly.
- It works in real numbers only. sqrt of a negative value, log of a non-positive value, and asin or acos outside −1 to 1 all raise a domain error rather than returning a complex result.
- Factorials stop at 170. Beyond that the value exceeds what a double can hold, so the engine reports an overflow instead of returning infinity.
- It is not a computer algebra system. There is no symbolic algebra, no equation solving, no differentiation or integration, and no matrix mode — it evaluates numeric expressions.
- Nothing is sent anywhere: the parser runs entirely in the page, and saved calculations live in your browser's local storage.
Tips
- Glance at the DEG/RAD/GRAD indicator before every trigonometric calculation. It is the single most common cause of an unexpected answer, and it persists between calculations.
- Wrap negative bases in parentheses when raising them to a power. −2² and (−2)² are different expressions in standard precedence, and the parser follows the standard.
- In STATISTICS mode, decide up front whether your numbers are a whole population or a sample. Reporting the wrong one is a more consequential mistake than any rounding difference.
Troubleshooting
My trigonometric answers are completely wrong.
Check the angle mode. sin(90) is 1 in DEG and about 0.894 in RAD, and the mode stays where you last left it. Switch to DEG for degree input and RAD for radians.
I get Math Error or a domain error.
The expression asked for something undefined in real arithmetic — a square root or logarithm of an invalid value, an inverse sine outside −1 to 1, a factorial of a negative or fractional number, or a division by zero. The message names which one.
The last digits of my result look wrong.
That is binary floating-point representation, not a calculation error. Use the decimal-places setting to round the display, and expect the same behaviour from any calculator or spreadsheet using doubles.
My keyboard input does not do what I expect.
Physical keyboard input is supported, but browser and OS shortcuts take priority over a web page. If a key seems to be swallowed, use the on-screen button — and the Keybind Checker documents which combinations browsers and operating systems reserve.
Ready to run it?
Trigonometry, logs, factorials and statistics with a zero-eval expression parser. Nothing to install, and it opens in this browser.