Skip to main content
NyankoTools

Scientific Calculator (Trig, Log, Roots, Factorial, Degrees/Radians)

Type an expression and press Enter, or tap the buttons. It supports trigonometry, logarithms, square roots, powers, factorials, percent, and "ans" for the previous result. Floating-point noise such as 0.1+0.2 is rounded to 12 significant digits. For areas and volumes of shapes, try the Geometry Calculator. Everything runs in your browser, so nothing you type is sent to a server.

🔒 Runs in your browser · Your data is never sent to a server

Angle unit
Result

History

    No calculations yet.

    Supported functions and operators

    Functions

    sin(x) cos(x) tan(x)
    Trigonometric functions, in degrees or radians per the angle setting
    asin(x) acos(x) atan(x)
    Inverse trig functions; results use the selected angle unit
    atan2(y, x)
    Two-argument arctangent
    sinh(x) cosh(x) tanh(x)
    Hyperbolic functions
    sqrt(x) √x
    Square root (parentheses optional, as in √2)
    cbrt(x)
    Cube root
    abs(x)
    Absolute value
    exp(x)
    e raised to the power x
    ln(x)
    Natural logarithm (base e)
    log(x) log(x, b)
    Base-10 logarithm; pass a second argument for another base
    log10(x) log2(x)
    Base-10 and base-2 logarithms
    floor(x) ceil(x)
    Round down / round up
    round(x)
    Round to the nearest integer
    trunc(x)
    Drop the fractional part (toward 0)
    sign(x)
    Sign (-1, 0 or 1)
    fact(x)
    Factorial (whole numbers 0 to 170)
    pow(a, b)
    a raised to the power b
    mod(a, b)
    Modulo (never negative)
    min(a, b, …) max(a, b, …)
    Smallest / largest value (up to 8 arguments)

    Operators and notation

    + - * /
    Arithmetic (full-width × ÷ − + also work)
    a^b
    Power; 2^3^2 is evaluated right to left as 2^(3^2)
    n!
    Factorial
    n%
    Divide by 100 (50% = 0.5)
    2x 2(x+1) 2pi
    The multiplication sign can be omitted

    Constants and variables

    pi π
    Pi
    e
    Euler's number
    tau
    2π
    ans
    The previous result

    Notes

    • Operators are + - * / ^ ! %. The full-width × ÷ − are accepted too, and you can omit the multiplication sign as in 2π or 3(4+5).
    • Functions include sin cos tan asin acos atan sinh cosh tanh sqrt cbrt abs exp ln log log2 floor ceil round mod min max. log is base 10; pass a base as in log(8,2).
    • Trig functions use either degrees or radians. After switching, press Enter or = again to recalculate.
    • Results are rounded to 12 significant digits. Factorials work for whole numbers up to 170!.
    • The history keeps the last 20 calculations and is cleared when you close or reload the page. Click an entry to put its expression back in the input.

    Glossary

    Radian

    A unit of angle where 180 degrees equals π radians. Math libraries and programming languages usually expect radians for trig functions.

    Common vs natural logarithm

    The common logarithm (log) uses base 10, while the natural logarithm (ln) uses Euler’s number e (about 2.71828). log(1000) is 3 and ln(e) is 1.

    Factorial

    The product of all whole numbers from 1 to n, written n!. For example 5! = 5×4×3×2×1 = 120, and 0! is defined as 1.

    FAQ

    Why does 0.1+0.2 show 0.3 instead of 0.30000000000000004?

    JavaScript stores numbers as binary floating point, so 0.1+0.2 is really 0.30000000000000004 internally. This calculator rounds results to 12 significant digits, so you see 0.3. It is not suited to work that needs more than 12 digits, such as exact arithmetic on very large integers.

    Why does sin(30) give -0.988 instead of 0.5?

    The angle unit is set to radians. Switch to "Degrees (DEG)" and press Enter or = again to treat 30 as 30 degrees. In radian mode, write sin(30*π/180) instead.

    How large a factorial can it calculate?

    Whole numbers from 0 up to 170!. From 171! the result exceeds the largest number JavaScript can represent, so the tool shows a "cannot calculate" message. Factorials of decimals or negative numbers are not supported.

    What is "ans"?

    A variable holding the last successful result. After calculating 12*5, typing ans/3 gives 20. A calculation that ends in an error does not update it.

    Can I leave out the multiplication sign, as in 2π or 3(4+5)?

    Yes. A number, constant or parenthesis directly followed by another is treated as multiplication. Powers are evaluated right to left (2^3^2 is 2^9 = 512), so add parentheses if you want a different order.

    Share this page

    ↑↓ Select Enter Open Esc Close