Calculator

About the Calculator

A dual-mode calculator with a Basic keypad for everyday arithmetic and a Scientific mode that adds trigonometry (sin, cos, tan), logarithms (ln, log), powers and roots (x², x³, √x), factorial, reciprocal, and the constants π and e. It runs entirely in your browser with full keyboard support, and it evaluates every expression with a safe custom math parser — no eval(), nothing sent to a server.

This tool works in your browser: the files and text you use are processed on your device and are not uploaded.

How to use it

  1. Type using the on-screen keypad or your physical keyboard (digits, + − × ÷, Enter to equal, Backspace to delete, Esc to clear).
  2. Switch to Scientific mode for trig, logs, powers, factorial and constants.
  3. In Scientific mode, toggle Rad/Deg to control how angles are interpreted by sin, cos and tan.

Frequently asked questions

Does the calculator follow order of operations?

Yes. Expressions are evaluated with standard precedence — multiplication and division before addition and subtraction — so 2 + 3 × 4 returns 14, not 20.

What is the Rad/Deg toggle for?

It controls whether the trigonometric functions treat your input as radians or degrees. Set it to Deg to compute sin(30) as 0.5; leave it on Rad for radian-based math.

Why do I sometimes see rounded results?

Results are rounded to about 12 decimal places to hide floating-point artefacts, so 0.1 + 0.2 shows as 0.3 rather than 0.30000000000000004.

Can I use my keyboard?

Yes. Number keys, the four operators, the percent key, Enter or = to calculate, Backspace to delete the last digit, and Escape to clear all work directly.

Related tools