Scientific Calculator

Trigonometry, logarithms, powers and memory, with full keyboard support.

0 Type an expression and press Enter.
FunctionsClick to insert

HistoryClick any entry to reuse it

Features

  • Trigonometric, inverse trig and hyperbolic functions
  • Natural and base-10 logarithms, powers and roots
  • Radian and degree modes
  • Memory registers and a reusable history
  • Safe expression parser, no eval()

How to use it

  1. Type an expression such as sin(pi/4) * sqrt(2).
  2. Press Enter or Calculate.
  3. Switch to degrees if your angles are in degrees.
  4. Click any history entry to reuse it.

How this evaluates expressions safely

The obvious way to build a calculator in JavaScript is to hand the user's input to eval(). That works, and it is also a security hole: eval executes arbitrary code, so anything typed into the box, or injected into it via a crafted link, runs with the page's full privileges. Plenty of online calculators do exactly this.

This one implements a proper recursive-descent parser instead. The expression is tokenised into numbers, operators, parentheses and function names, then parsed according to precedence rules, parentheses first, then functions and unary minus, then exponentiation, then multiplication and division, then addition and subtraction. Anything the grammar does not recognise is rejected with an error rather than executed.

One detail that surprises people: exponentiation is right-associative, so 2^3^2 means 2^(3^2) = 512, not (2^3)^2 = 64. That matches mathematical convention and most scientific calculators, though some spreadsheet software gets it wrong. Unary minus binds looser than exponentiation too, so -2^2 is βˆ’4 rather than 4.

Frequently asked questions

Yes, completely. Scientific Calculator is free with no usage limits, no account and no sign-up. There is no paid tier and no trial that expires. Tools marked Premium on this site carry that label to indicate a deeper feature set, not a price.
Scientific Calculator covers trigonometric, inverse trig and hyperbolic functions, natural and base-10 logarithms, powers and roots, radian and degree modes, among other things. Everything is available immediately with no account, no sign-up and no usage limit.
The obvious way to build a calculator in JavaScript is to hand the user's input to eval(). That works, and it is also a security hole: eval executes arbitrary code, so anything typed into the box, or injected into it via a crafted link, runs with the page's full privileges. Plenty of online calculators do exactly this.
Everything happens inside your browser. The text you enter is processed by JavaScript running on your own device and is never sent to a server, there is no backend to send it to. You can confirm this in your browser's Network tab while you use the tool. Because nothing depends on a server, the tool also keeps working offline once the page has loaded, the site registers a service worker that caches it after your first visit.

Related tools

Further reading

πŸ“– Scientific Calculator Functions Explained

Read the full guide on the 123MiniApps blog.

Pick a theme

Ten hand-tuned palettes.