BrowserTools
Home / Calculators / Scientific Calculator, Online with Functions and History

Scientific Calculator, Online with Functions and History

Free online scientific calculator with trig, logarithms, powers, factorials, constants pi and e, DEG/RAD modes, keyboard input, and history.

Loading Scientific Calculator, Online with Functions and History… If nothing happens, please enable JavaScript.

This scientific calculator combines a classic button pad with a free-text expression field, so you can either click your way through a calculation or simply type it the way you would write it on paper: sin(45) + sqrt(2)^2 * ln(e). It supports addition, subtraction, multiplication, division, exponentiation with ^, percentages, parentheses to any depth, unary minus, the constants pi and e, and the standard scientific function set: sin, cos, tan and their inverses asin, acos, atan, base-10 log, natural ln, sqrt, abs, exp, and the factorial operator n!. The result updates live as you type, and pressing Enter or the equals key commits the calculation to a history list you can click to reuse later.

Frequently asked questions

How do I type an expression instead of clicking buttons?
Click into the expression field and type freely using your keyboard: digits, + - * / ^ ( ), function names like sin( or sqrt(, and the constants pi and e. The result appears live as you type, and Enter evaluates the expression and saves it to the history. The button pad and the keyboard can be mixed at any time.
What is the difference between DEG and RAD mode?
DEG interprets angles in degrees (a full circle is 360), RAD in radians (a full circle is 2 pi). In DEG mode sin(30) = 0.5; in RAD mode you would write sin(pi/6) for the same result. Inverse functions follow the same setting, so asin(1) returns 90 in DEG mode and about 1.5708 in RAD mode. The active mode is shown on the toggle at all times.
What does the ans key do?
ans inserts the result of your previous calculation, so you can chain operations without retyping. Calculate 25*4, then type ans/10 to get 10. The value updates after every evaluation, exactly like the ANS key on a physical scientific calculator.
Why does -2^2 give -4 and not 4?
By mathematical convention, exponentiation binds tighter than the leading minus sign, so -2^2 is read as -(2^2) = -4. This matches textbooks, Google's calculator, and WolframAlpha. If you mean the square of negative two, write (-2)^2, which gives 4.
In what order are operations evaluated?
Standard PEMDAS/BODMAS order: parentheses first, then functions and factorials, then exponentiation (right to left, so 2^3^2 = 512), then multiplication and division (left to right), then addition and subtraction. Use parentheses whenever you want to force a different order or make an expression easier to read.
How does the factorial work and what is its limit?
Append ! to a non-negative integer or a parenthesised expression: 5! = 120, (3+2)! = 120. Factorials grow explosively; 170! is about 7.26 × 10^306, the largest value that fits in double-precision floating point, so anything above 170! reports an overflow. Negative or fractional inputs produce a domain error.
What happens if I divide by zero?
The calculator reports division by zero as an explicit error instead of showing Infinity or NaN. Similarly, domain violations such as sqrt(-4), ln(0), log(-1), or asin(2) produce clear messages explaining what went wrong, so a typo never silently becomes a wrong number.
Is my calculation history stored on a server?
No. The history is saved only in your browser's local storage on your own device and never leaves it. You can clear it at any time with the Clear history button, and clicking any past entry loads its expression back into the input for reuse or editing.
Does this calculator use eval() to compute expressions? Is that safe?
No eval is involved. Expressions are processed by a hand-written tokenizer and parser that only understands numbers, the supported operators, and the whitelisted function names. Arbitrary code can never execute, and everything is computed locally in your browser with double-precision (about 15-16 significant digits) arithmetic.
Can I use implicit multiplication like 2pi or 3(4+1)?
Yes. When a number, closing parenthesis, or constant is immediately followed by a constant, function, or opening parenthesis, a multiplication is inserted automatically, so 2pi means 2*pi, 3(4+1) means 3*(4+1), and 2sin(30) means 2*sin(30). When in doubt, writing the * explicitly always works too.

About Scientific Calculator, Online with Functions and History

Expressions are evaluated by a purpose-built mathematical parser that runs entirely in your browser, following the standard order of operations (PEMDAS/BODMAS): parentheses first, then functions and factorials, then exponentiation (right-associative, so 2^3^2 = 2^9 = 512), then multiplication and division from left to right, and finally addition and subtraction. Unary minus binds more loosely than exponentiation, which means -2^2 evaluates to -4, matching the convention used by mathematics textbooks and by tools like Google and WolframAlpha. Implicit multiplication is understood too, so 2pi, 3(4+1), and 2sin(30) all work as expected. A worked example: 3 + 4 * 2 ^ 2 evaluates the power first (2^2 = 4), then the product (4 × 4 = 16), then the sum, giving 19.

The DEG/RAD toggle controls how angles are interpreted. In degree mode, sin(30) = 0.5 and asin(1) = 90; in radian mode, sin(pi/6) = 0.5 and asin(1) = pi/2 ≈ 1.5707963268. Forgetting which mode a calculator is in is the single most common source of wrong answers in trigonometry, so the active mode is always displayed and applies to all six trig functions consistently. The ans variable holds your previous result, letting you chain calculations naturally: compute 144/12, then type ans*3 to get 36, exactly as on a physical scientific calculator. The factorial operator handles integers from 0! = 1 up to 170! (about 7.26 × 10^306, the largest factorial a computer's double-precision numbers can hold).

Your calculation history is saved locally in your browser, never on a server, and no expression you type is transmitted anywhere. Clear error messages distinguish syntax problems (an unbalanced parenthesis, a missing operand) from mathematical domain errors, such as the square root of a negative number, the logarithm of zero or a negative value, asin or acos outside the interval from -1 to 1, or the factorial of a negative or fractional number. Division by zero is reported explicitly rather than silently returning a meaningless value. Whether you are checking homework, converting a formula from a paper, or doing quick engineering estimates, everything runs instantly and offline once the page has loaded.

From Slide Rules to Pockets: a Short History of the Scientific Calculator

Until the early 1970s, the working tool of every engineer was the slide rule, a wooden or aluminium ruler that multiplied and divided via logarithmic scales, good to about three significant digits. The machines that put it in museums arrived with startling speed. Hewlett-Packard's HP-35, launched in 1972 at $395 (well over $2,500 in today's money), was the first handheld scientific calculator; it earned its name from its 35 keys, and legend has it that Bill Hewlett insisted the device fit into his shirt pocket. HP's market research had predicted meagre sales; the company sold about 100,000 units in the first year and 300,000 before retiring the model in 1975. Within a few years, slide rule production had essentially collapsed worldwide.

The HP-35 also cemented a famous split in calculator culture: HP machines used Reverse Polish Notation, where you enter 3, then 4, then press +, no equals key and no parentheses needed, while Texas Instruments and most rivals adopted the algebraic entry style with in-line operators that virtually all calculators, and this one, use today. RPN survives as a beloved niche: devotees argue it requires fewer keystrokes and mirrors how one actually thinks through a computation, and HP kept RPN models in production for decades. The scientific calculator's other great cultural moment came in classrooms: Casio's fx series, introduced in 1978, and TI's graphing models from 1990 onward made advanced functions so cheap that exam boards had to invent the phrase "approved calculator list."

Floating-point arithmetic, the number system behind this and virtually every calculator, has its own dramatic history. The IEEE 754 standard of 1985, largely shaped by Berkeley professor William Kahan (who earned a Turing Award for it), defined the double-precision format whose quirks still surprise people: 0.1 + 0.2 is famously not exactly 0.3, because 0.1 has no finite binary representation, and the largest representable number is about 1.8 × 10^308, which is exactly why factorials beyond 170! overflow. Kahan had sharpened his ideas partly by finding and documenting subtle bugs in early HP calculators, and manufacturers hired him to make their arithmetic honest; the result is that a humble browser calculator today carries more carefully engineered numerics than the machines that guided the Apollo missions.

Support