GlobalFree to use

Scientific calculator

Evaluate arithmetic, powers and trigonometric functions in radians without eval.

Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.

Input

Tip: press Ctrl + Enter to run

Your result

Your result will appear here.

About this tool

Type a whole expression the way you would write it on paper and get the result: brackets, + − × ÷, powers with ^, square roots, sine, cosine, tangent and their inverses, natural and base-10 logarithms, exponentials, absolute value, floor and ceiling, plus the constants pi and e. The expression is read by a small mathematical parser rather than run as code, so nothing typed can execute in your browser.

Trigonometric functions use radians, as in most programming languages and spreadsheets. To work in degrees, multiply the angle by pi/180 first.

How to use it

  1. Type the expression, for example sqrt(81) + sin(pi / 2).
  2. Use ^ for powers, ln for natural log and log for base-10 log.
  3. Run it to get the result.
  4. If you get an error, check brackets and that every function has its argument in parentheses.

How the calculation works

The expression is tokenized and evaluated with operator precedence (brackets, then ^ right to left, then unary minus, then × and ÷, then + and −). Functions: sqrt, sin, cos, tan, asin, acos, atan, abs, ln, log (base 10), exp, floor, ceil. Results that are not finite numbers, such as division by zero, are rejected.

Worked example

Checking a computer-science exercise, 2^10 − log(1000) × 3 evaluates to 1,015: 2^10 is 1,024, log(1000) is 3, and 3 × 3 = 9 is subtracted. In another problem, cos(pi/3) + sqrt(2)^2 gives 2.5.

Limitations

  • Real numbers only; square roots of negative numbers are rejected.
  • Up to 500 characters and 40 levels of nesting.
  • No memory, variables or history.

Last updated:

Frequently asked questions

Does it use degrees or radians?

Radians. For sin(30°), enter sin(30 * pi / 180), which gives 0.5.

Is log base 10 or base e?

log is base 10 and ln is the natural logarithm (base e).

Why is 1/0 rejected?

Division by zero has no finite value, so it is reported as an error rather than shown as infinity.

Troubleshooting

It says the input is invalid.

Check for implicit multiplication such as 2pi or 3(4+1); write 2*pi and 3*(4+1).

sin(90) is not 1.

The angle is in radians. Use sin(pi/2) or sin(90 * pi / 180).

−2^2 gives −4.

Powers bind tighter than a leading minus, as in standard notation. Write (−2)^2 for 4.

Privacy & Free to use

Are my inputs stored?

Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.

Is this tool free?

Yes. No signup or payment is required.

Processed in your browser

Useful next steps