Scientific Calculator

Add, subtract, multiply and divide, or go scientific with trigonometry, logarithms, powers, parentheses and memory — a full calculator that works on any device, right in your browser.

0
Calculation history

All calculations run in your browser — nothing is ever sent to a server.

Getting the most out of the scientific calculator

A basic four-function calculator is fine for a grocery bill, but it breaks down the moment a problem needs an angle, a logarithm, or a number set aside in memory while you work out something else. This tool covers that in-between zone — homework mixing trigonometry with plain arithmetic, a check on a log-scale reading, or a multi-step calculation with an intermediate result to park. Because every keypress builds a real expression rather than a running two-number tally, you can type something as long as (3+5)^2÷4-sin(30) and get one correct answer in a single pass, parentheses and all.

Entering an expression

  1. Type digits and the decimal point as usual; use ± to flip the sign of the number you just entered.
  2. Place an operator (+, −, ×, ÷, x^y) between two values, and use ( / ) to group parts of the expression — nesting is unlimited.
  3. Tap a function key (sin, cos, tan, √, log, ln) and its opening parenthesis is inserted automatically; type the argument and close the bracket yourself with ). Pressing = with a bracket left open is refused with a clear error instead of a guess.
  4. π and e insert the constants directly — no digits to type.
  5. Press = to evaluate the whole expression using standard mathematical order of operations.

Order of operations, exactly as this engine applies it

Every expression is converted from the order typed (infix) into Reverse Polish Notation via a shunting-yard algorithm, then evaluated on a stack — the same technique used in real programming-language parsers, and the reason this calculator never touches JavaScript's eval(). The practical effect is a strict precedence order:

PrecedenceOperatorsDirection
Highestx^y (power)right to left
Middle× and ÷left to right
Lowest+ and −left to right

The power operator's right-to-left direction is the detail that catches people out, because it differs from how power works in a typical spreadsheet formula. Typed left to right, 2^3^2 is not (2^3)^2 — this engine groups it as 2^(3^2).

Worked example — right-associative powers
2^3^2 → the rightmost power binds first: 3^2 = 9, then 2^9 = 512 (not 64, which is what (2^3)^2 would give).

Worked examples

Mixed operators and a group
5 + 2 × 3^2 − (4 − 1): first the power, 3^2 = 9; then the multiplication, 2 × 9 = 18; then the parenthesis, 4 − 1 = 3; then left to right, 5 + 18 − 3 = 20.
Degrees vs. radians
In DEG mode, cos(60) = 0.5, so cos(60) × 10 = 5 — the adjacent side of a right triangle with a 60° angle and a 10-unit hypotenuse. In RAD mode, cos(π÷3) gives the same 0.5. But type cos(60) while still in RAD mode and it treats 60 as 60 radians (about 9.5 full turns), returning roughly −0.952 — a valid answer to a different question than intended.
Logs and memory together
log(1000) = 3 (base 10); ln(1000) ≈ 6.907755 (natural log, base e). Press M+ to store the 3, clear the display with AC — which leaves memory untouched — compute ln(1000), press M+ again, and MR now recalls 9.907755, the two results combined without writing anything down.

Function and memory key reference

KeyComputesNotes
sin / cos / tanTrig ratio of the argumentUses whichever mode the DEG/RAD button currently shows
Square rootNegative input raises a math error
logBase-10 logarithmArgument must be greater than 0
lnNatural logarithm, base eArgument must be greater than 0
x^yPowerRight-associative, see above
%Divides the value or group before it by 100(200+50)% = 2.5, not 50% of the whole line
M+ / M− / MR / MCAdd / subtract / recall / clear one memory slotSurvives AC; only MC resets it

Keyboard shortcuts

The number row, decimal point, +, −, *, /, ^, %, ( and ) all work directly from the keyboard, along with Enter or = to evaluate, Backspace to delete the last entry, and Escape as an all-clear. Functions, π, e and the memory keys have no shortcut by design — they come up rarely enough mid-expression that a stray keystroke isn't worth the risk.

Common mistakes

Precision and limits

Results are rounded to 12 significant digits before display, so ordinary floating-point noise — 0.1 + 0.2 showing as 0.30000000000000004 — doesn't appear here; you'll see a clean 0.3 instead. There's no inverse trig (asin/acos/atan), no factorial, and no complex-number support. Every calculation, trig and logarithms included, runs locally on this page — nothing is sent anywhere, and history is saved only in this browser.

Sources & further reading

Frequently asked questions

Is this scientific calculator free, and does it work offline?

Yes — this calculator is completely free, has no ads and needs no sign-up. It's also installable as a small offline app (PWA): once you've loaded the page, basic and scientific calculations keep working even without an internet connection, because every calculation runs locally in your browser rather than on a server.

How do sin, cos and tan work, and what's the difference between degree and radian mode?

Tap the DEG/RAD button to choose how angles are measured before using sin, cos or tan. In degree mode, sin(30) = 0.5 and cos(60) = 0.5, matching what you'd get from a protractor. In radian mode the same functions expect angles in radians, so sin(π÷2) — entered using the π key — also equals 1. Mixing up the modes is the most common reason a trig result looks wrong, so the current mode is always shown on the DEG/RAD button.

Does this calculator follow the order of operations, and can I use parentheses?

Yes. Multiplication and division are always evaluated before addition and subtraction, powers (x^y) are evaluated before multiplication and division, and percent is applied directly to the number or group before it — the standard PEMDAS/BODMAS order. For example, 3 + 4 × 2 gives 11, not 14, and (3 + 4) × 2 gives 14 because the parentheses force the addition first. You can nest parentheses as deeply as you like; the tool tells you clearly if one is left unmatched.

What does the percent key do, and how do the memory keys (M+, M-, MR, MC) work?

The % key divides whatever comes before it by 100, so 50% becomes 0.5 and (200+50)% becomes 2.5 — handy for discounts, tax and tips. The memory keys hold one separate number across calculations: M+ adds the current value to memory, M- subtracts it, MR recalls the stored value into your current entry, and MC clears memory back to zero. A small "M" indicator appears next to the display whenever memory holds a non-zero value.

Is any calculation sent to a server, and why doesn't this tool use eval()?

No calculation ever leaves your device — every operation, from basic addition to logarithms, runs entirely in your browser, and your calculation history is stored only in your browser's local storage. The math engine is a hand-written shunting-yard parser that converts your input into a safe sequence of operations rather than running your text through JavaScript's eval() or Function(), which is a well-known security risk for any tool that evaluates user-typed expressions.