OnlineCalcFree

Free Scientific Calculator — Trig, Log & Powers

By Updated How we check our numbers

Build an expression with buttons or the keyboard, then press equals or Enter. Supports trig, logs, powers, π, e, and parentheses—parsed locally without shipping your work to a server.

Expression

√ inserts sqrt(. Multiplication on the keyboard is the * key.

Quick tips

  • Use parentheses for clarity: (-3)^2 versus -3^2.
  • log is base 10; ln is natural log.
  • Inverse trig outputs match your degree/radian toggle.

A scientific keypad that stays on your device

Most “scientific” pages either embed a heavyweight library or call eval on whatever you typed—convenient for the author, risky for the reader, and opaque when something breaks. This page takes a different route: your expression is tokenized into numbers, operators, parentheses, and function names, then evaluated with a small recursive-descent parser that understands the same precedence rules you were taught in algebra class (including the fact that exponentiation binds before a leading minus unless you add parentheses).

Trigonometry buttons accept arguments in radians by default because that is what the underlying JavaScript Math library uses internally. Checking “Trig in degrees” remaps inputs for sine, cosine, tangent, and their inverses so classroom-style degree measures behave as expected. Logarithms follow the usual split: common log base ten versus natural log base e, each refusing negative inputs because the real logarithm is not defined there.

When a full scientific keypad still earns its pixels

Students checking homework, hobbyists tuning antenna angles, and professionals sanity-checking a formula in a meeting all benefit from a keypad that goes beyond four-function arithmetic without opening a spreadsheet. This implementation will not replace a computer algebra system, graphing tool, or statistics package—but it will return a numeric value for a well-formed expression quickly, offline-friendly once the page is cached, and without asking you to trust opaque remote code execution every time you press equals.

How it calculates and sources

The expression is evaluated with these rules, from tightest binding to loosest:

  • Parentheses and functions: sin cos tan asin acos atan sqrt abs ln log, each written with brackets, plus the constants pi (π ≈ 3.14159) and e (≈ 2.71828). log is base 10 and ln is base e.
  • Powers ^, grouped right to left: 2^3^2 = 29 = 512.
  • Leading + or −, applied after the power: -3^2 = −(32) = −9, while (-3)^2 = 9.
  • Multiply and divide, then add and subtract, each left to right. Dividing by zero is reported as an error, and so is implied multiplication such as 2(3); type 2*(3) instead.

Angles: by default, sin, cos and tan take an angle x in radians. With “Trig in degrees” ticked, the angle is converted first as x × π ÷ 180, and asin, acos and atan return degrees (radians × 180 ÷ π). sqrt of a negative number, ln or log of zero or a negative number, and asin or acos outside −1 to 1 are reported as domain errors.

Precision: the calculation uses 64-bit binary floating point (about 15–17 significant digits), and functions such as sin and log are approximations whose last digit can vary slightly between browsers. The display is rounded to 12 decimal places, or to 12 significant digits for results of 1015 or more and for non-zero results smaller than 10−12. Rounding hides most binary noise (0.1 + 0.2 shows as 0.3), but values that are exactly zero in theory can still show as a tiny number: sin(pi) in radians displays about 1.2 × 10−16, not 0.

Worked example: with degrees ticked, sin(30)+log(100) = sin(30°) + log10(100) = 0.5 + 2 = 2.5. With degrees unticked, sin(30) treats 30 as radians and gives about −0.988031624093, so the same expression shows 1.011968375907.

Sources

These results are checked by automated tests against independently worked examples — see how we check our numbers.

Frequently asked questions

How do I enter functions like sine or logarithm?
Tap a function button to insert its name with an opening parenthesis, type the argument, then add the closing parenthesis. Example: sin(1.57) with radians mode, or sin(90) with degrees mode checked.
Does this calculator use eval or send my expression to a server?
No eval. A small tokenizer and recursive parser run locally in your browser. Nothing is transmitted for calculation unless your own extensions intercept the page.
What is the difference between log and ln?
log is base 10 (common logarithm). ln is the natural logarithm with base e. Both require a positive argument inside the parentheses.
Why does -3^2 show -9 instead of 9?
Exponentiation binds tighter than the leading unary minus, so the expression is interpreted as negating the square of three, which is negative nine. Use parentheses if you intend (-3)^2.
Can I type on the keyboard as well as tap buttons?
You can type directly into the expression field using digits, decimal points, operators + - * / ^, parentheses, and names like pi, e, sin(, cos(, and so on. Press Enter to evaluate.

Related calculators