ToolHub

Scientific Calculator

Trig, logs, powers, factorial — with keyboard input and history

Tip: type directly with your keyboard. Enter = calculate, Esc = clear.

History

Your recent calculations will appear here.

Overview

A real scientific calculator in your browser

This is a full scientific calculator: trigonometry, logarithms, exponents, roots, factorial, and the constants pi and e. It parses your expression the way a graphing calculator does, respecting order of operations, so you can type a whole formula on one line and get the right answer. Type with your keyboard or tap the buttons, see the result update live, and reuse any past result from the history panel.

How it parses

Order of operations (PEMDAS / BODMAS)

The calculator uses a proper expression parser (the shunting-yard algorithm), not a left-to-right button sequence. That means it follows the standard order of operations:

  • Parentheses / Brackets first
  • Exponents / Orders (powers and roots)
  • Multiplication and Division (left to right)
  • Addition and Subtraction (left to right)

So 2 + 3 × 4 correctly gives 14, not 20. And (2 + 3) × 4 gives 20. Use parentheses whenever you want to override the default order.

What each button does

The functions explained

Trigonometry: sin, cos, tan

Set DEG or RAD before using these. sin(30) is 0.5 in degrees but −0.988 in radians — the same input, very different answers. The inverse functions (asin, acos, atan) are available by typing them directly.

Logarithms: log and ln

log is base 10 (log(1000) = 3). ln is the natural log, base e (ln(e) = 1). To compute a log in another base, use the change-of-base formula: log base b of x = ln(x) / ln(b).

Powers and roots

squares the value, (the ^ symbol) raises to any power, and takes the square root. For a cube root use x^(1/3); for any nth root use x^(1/n).

Factorial

n! multiplies all whole numbers from 1 to n. 5! = 120. Used heavily in probability and combinatorics. Values above 170! overflow to infinity (a limitation of standard floating-point numbers).

Constants: pi and e

pi ≈ 3.14159 (ratio of a circle's circumference to its diameter). e ≈ 2.71828 (the base of natural logarithms). Type them as part of any expression.

The most common mistake

Degrees vs radians

Always check your angle mode

The single biggest source of wrong trig answers is the wrong angle mode. Degrees split a circle into 360 parts; radians use 2π (≈ 6.28) for a full circle. School geometry usually uses degrees. Calculus and physics usually use radians. The active mode is shown at the top of the display — switch it before calculating.

Work faster

Keyboard shortcuts

  • Numbers and + − * / ^ ( ) . — type directly
  • Enter or = — calculate
  • Backspace — delete the last character
  • Escape — clear everything
  • Click a history entry — reuse that result
  • Ans button — insert the most recent answer

Behind the scenes

Privacy and how it runs

No eval, no server

The calculator uses a custom safe expression evaluator — never JavaScript's eval(), which would be a security risk. Everything runs locally in your browser. Nothing you calculate is sent anywhere.

Common questions

How do I calculate a percentage?

The % button inserts × 0.01, so 50 × 20% evaluates as 50 × 0.20 = 10 (20% of 50). For percentage increase, compute 50 × 1.2 to add 20%.

How do I compute a cube root?

Use a fractional exponent: 27^(1/3) = 3. For any nth root, raise to the power 1/n.

Why does sin(90) give 1 but sin(pi/2) needs radians?

In degrees mode, 90 degrees is a quarter turn, and sin is 1. In radians mode, the equivalent is π/2 ≈ 1.5708. Both describe the same angle; the number you type depends on the mode.

What does E mean in a result?

Scientific notation for very large or very small numbers. 1.5E12 means 1.5 × 10¹² (1,500,000,000,000). The calculator switches to this format automatically when numbers get too long to display normally.

Can it handle long expressions?

Yes. Type an entire formula with nested parentheses and multiple functions on one line, like sqrt(sin(45)^2 + cos(45)^2), and it evaluates the whole thing at once with correct precedence.

Related calculators

Other calculation tools that pair with the scientific calculator.

Last reviewed: · Methodology based on US building code standards, contractor pricing surveys, and manufacturer specifications.

Quick steps

1

Type or tap

Use the on-screen buttons or type directly with your keyboard. Enter calculates, Backspace deletes, Escape clears.

2

Pick degrees or radians

Toggle DEG/RAD before using trig functions. Most everyday angle work uses degrees; calculus and physics often use radians.

3

Reuse results

Click any history entry or the Ans button to drop the last result back into a new calculation.

Frequently asked questions

Does this calculator follow order of operations?

Yes. It uses a proper expression parser (shunting-yard algorithm) that respects PEMDAS/BODMAS: parentheses, exponents, then multiplication/division, then addition/subtraction. So 2 + 3 × 4 correctly equals 14, not 20.

How do I calculate sin, cos, or tan?

Tap the function button (it inserts 'sin(' etc.), enter the angle, and close the parenthesis. Set DEG or RAD first — sin(30) is 0.5 in degrees but -0.988 in radians.

What's the difference between log and ln?

'log' is the base-10 logarithm (log 1000 = 3). 'ln' is the natural logarithm, base e (ln of e = 1). Both are available as separate buttons.

How do I do powers and square roots?

Use x² for squaring, xʸ (the ^ symbol) for any power, and √ for square root. For a cube root, use x^(1/3).

Can I use my keyboard?

Yes. Type numbers and operators directly. Enter or = calculates, Backspace deletes the last character, Escape clears everything. It's faster than clicking for long expressions.

Is my calculation sent to a server?

No. Everything is computed locally in your browser with a safe expression evaluator (no eval()). Nothing you type is transmitted or stored.