Scientific calculator

Scientific calculator

Enter an expression or use the built-in keypad. A dedicated parser evaluates the documented mathematical grammar locally, without eval or Function.

Calculate an expression

Examples: sin(30), sqrt(81), 2^8, 5!, 200*15% or log(1000). Implicit multiplication such as 2pi is not supported; write 2*pi.

Use the decimal separator for your locale. Press Enter to calculate.

Angle unit
Supported functions

Result

The result will appear here.

Calculated value

Local history

No calculation is stored in this browser.

    Local calculation and private history

    Expressions are evaluated in your browser. The latest ten calculations are stored only in this browser and can be deleted at any time.

    Supported functions

    Functions take one argument in parentheses. Trigonometric functions use the selected degree or radian mode.

    Trigonometry

    • sin, cos, tan
    • asin, acos, atan
    • sinh, cosh, tanh

    Roots and logarithms

    • sqrt, cbrt
    • ln, log, log2
    • exp

    Other operations

    • abs, floor, ceil, round
    • factorial: n!
    • percentage: n%
    • constants: pi, e, ans

    Syntax rules

    • Precedence is: parentheses, factorial and percentage, power, unary sign, multiplication/division, addition/subtraction.
    • Power is right-associative: 2^3^2 means 2^(3^2).
    • Percentage is postfix: 15% equals 0.15, so 200*15% equals 30.
    • Implicit multiplication is rejected: use 2*pi rather than 2pi.
    • Only real and finite results are supported.

    Examples

    sin(30)

    0.5 in degree mode

    The same expression gives a different value in radians.

    2^3^2

    512

    Exponentiation is evaluated from right to left.

    5! + sqrt(81)

    129

    5! is 120 and sqrt(81) is 9.

    200*15%

    30

    15% is converted to 0.15.

    Frequently asked questions

    Does the calculator use eval?

    No. A dedicated tokenizer and parser accept only the documented mathematical grammar.

    What precision is used?

    Calculations use JavaScript double-precision numbers and the displayed result is limited to fifteen significant digits.

    Why does tan(90) fail in degree mode?

    Tangent is undefined when the cosine of the angle is zero.

    What does ans mean?

    ans represents the most recent successful result available in the page.

    Technical references