Scientific Calculator
Full-featured scientific calculator with trig, logs, exponents, roots, and a complete expression parser. Order of operations, parentheses, and constants — type expressions naturally.
How to Use
- Type any mathematical expression in the input field — the calculator parses operator precedence and parentheses correctly.
- Use named functions: sin(), cos(), tan(), log() (base 10), ln() (natural), sqrt(), exp(), abs(), floor(), ceil(), round().
- Constants pi and e are predefined.
- Toggle between radians and degrees for trigonometric functions.
- Use ^ or ** for exponentiation: 2^10 = 1024.
- Press Enter or = to evaluate. The result joins the running history below.
Supported Functions
A Brief History of the Scientific Calculator
Mechanical "scientific" calculation predates electronic calculators by centuries. Slide rules (invented in 1622, refined through the 19th century) gave engineers and scientists their go-to multiplication, division, log, and trig tools through the 1970s. Mechanical desktop calculators handled basic arithmetic; specialized scientific functions waited for electronics.
Hewlett-Packard's HP-35 (1972) was the first handheld scientific calculator — a $395 device (about $3,000 today) that took the slide-rule industry from world-leading to extinct in less than a decade. The HP-35 introduced RPN (Reverse Polish Notation) input, a hardware-implemented log table for trig, and a battery-powered LED display. By 1980, programmable scientific calculators (HP-41C, TI-58) were standard tools for engineering students.
Modern scientific calculators are everywhere — built into operating systems, available as apps, embedded in spreadsheet formulas. The browser-based version you're using runs on the same JavaScript engine that handles every web page; the math precision (IEEE 754 double) matches every other computational environment. The slide rule's accuracy was about 3 significant digits; modern double-precision is 15–17. Same calculations, six orders of magnitude more precision.
About This Calculator
This calculator includes a recursive-descent expression parser that handles infix operators with proper precedence, function calls, parentheses, named constants, and implicit multiplication. Trigonometric functions accept either radians or degrees based on the toggle. All arithmetic uses JavaScript's native double-precision floating-point — same precision as Python's float, C's double, and most modern computing environments.
Everything runs entirely in your browser; no expressions are transmitted, logged, or stored. The history panel saves recently-evaluated expressions for reference and copy-paste. For arbitrary-precision arithmetic see the Big Number Calculator; for exact rational arithmetic see the Fraction Calculator.
Frequently Asked Questions
Does this respect order of operations?
Yes — the parser handles full PEMDAS/BODMAS: parentheses first, then exponents, then multiplication and division (left to right), then addition and subtraction (left to right). Implicit multiplication is supported (2pi, 3(4+5)). When in doubt, parenthesize: <code>(1 + 2) * 3</code> is unambiguous.
What's the difference between log and ln?
log is base-10 logarithm (log₁₀). ln is natural logarithm (base e). log2 is base-2. log(100) = 2; ln(e) = 1; log2(1024) = 10. Some calculators use 'log' for natural log instead — this one follows the calculus convention where log without subscript is base 10.
How precise is the calculator?
About 15–17 significant decimal digits, the same as JavaScript's IEEE 754 double-precision floating point. Common surprises: 0.1 + 0.2 = 0.30000000000000004 (not a bug — exact representation of decimal fractions in binary is impossible). For exact rational arithmetic, use the Fraction Calculator. For arbitrary-precision integers, use the Big Number Calculator.
Are angles in radians or degrees?
Either, controlled by the radio buttons. Radians is the mathematical default — sin(pi/2) = 1. Degrees is more intuitive for everyday angles — sin(90) = 1 in degree mode. Most engineering and physics use radians; surveying, navigation, and trigonometry textbooks often use degrees. If your answer looks wrong, double-check the angle mode.
Why does sin(0) sometimes give a tiny number instead of 0?
Floating-point representation of pi is slightly inexact, so sin(pi) is something like 1.22e-16 instead of exactly 0. For small results that should be zero, the calculator rounds to zero in the display when below a noise threshold; pure expressions still show full precision.
What's e^x vs exp(x)?
Identical. e^x is the explicit form using the constant e ≈ 2.71828. exp(x) is the named function — slightly more numerically stable for very large or very small inputs because the implementation can avoid intermediate overflow. Use either in everyday math.
Common Use Cases
Engineering calculations
Compute stress, strain, frequency response, and other formulas that combine trig, logs, and exponentials.
Physics homework
Evaluate kinematic, thermodynamic, or electromagnetic formulas with one keystroke per expression.
Statistics and probability
Compute z-scores, t-statistics, factorials (small ones), and probability distribution values.
Astronomy and navigation
Solve spherical-trig problems for sun position, great-circle distance, or celestial mechanics.
Financial math
Compute compound interest with arbitrary periods, log-based time-to-double, and continuous compounding.
Quick conversions
Use the parser as a tape calculator — chain operations, copy intermediate results, build up complex expressions.
Last updated: