Full PEMDAS expression parserReviewed 29 Sep 2026Runs in your browser

Scientific Calculator

Type or tap out a full expression with trig functions, logarithms, powers, roots and parentheses — evaluated with correct algebraic order of operations (PEMDAS), in degrees or radians, with a memory register.

Who wrote it

Built by Suhaib Hassan. Our methodology.

How the engine works

A recursive-descent parser (not eval()) tokenizes and evaluates your expression respecting parentheses, exponents, then multiplication/division, then addition/subtraction — with right-associative powers.

Why we built it

Full expressions with real order of operations, not left-to-right button-press arithmetic — see every intermediate step.

Expression

Presets
Result—
—

—

Angle modeDegrees
Memory0

Step-by-step working

—

—

    Order of operations (PEMDAS)

    Highest precedence first.

    PrecedenceOperationAssociativity
    1 (highest)Parentheses, functionsinnermost first
    2Exponents (^)right to left
    3Multiplication, divisionleft to right
    4 (lowest)Addition, subtractionleft to right

    Available functions

    sin cos tan asin acos atan (trig, respecting the DEG/RAD toggle), sqrt, log (base 10), ln (natural log), ^ for powers, ! for factorial, and the constants pi and e.

    By Suhaib Hassan · Reviewed 29 September 2026 · How CalculatePilot verifies formulas →

    Frequently asked questions

    Why does 2 + 3 × 4 equal 14 here, not 20?

    This calculator evaluates full algebraic expressions using standard order of operations (PEMDAS): multiplication before addition, so 3×4=12 is computed first, then 2+12=14. Our Basic Calculator instead applies operators immediately left to right, like a simple handheld calculator.

    Why does 2^3^2 equal 512, not 64?

    Exponentiation is right-associative: 2^3^2 means 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64. This matches standard mathematical convention.

    What's the difference between DEG and RAD mode?

    It controls the units trig functions expect (and return, for inverse functions). sin(30) in degree mode is 0.5; in radian mode, 30 is interpreted as 30 radians instead, giving a very different result.

    Is this safe — does it use eval()?

    No. It uses a hand-written recursive-descent parser that only recognizes numbers, named functions and arithmetic operators — it cannot execute arbitrary code, unlike JavaScript's eval().

    What does log vs. ln mean?

    log is base-10 logarithm (log₁₀); ln is the natural logarithm (loge, base e ≈ 2.71828). Use our Log Calculator for any other base.

    Related calculators

    Continue with algebra.

    All Math Calculators

    Embed This Scientific Calculator

    Free and responsive, and it runs in the visitor's browser. Branding removal from $7.99/month.

    <iframe src="https://www.calculatepilot.com/embed/scientific-calculator.html" width="100%" height="560" loading="lazy" title="Scientific Calculator"></iframe>
    For website owners

    Want this calculator on your own website?

    Embed it in one line of code. Keep it free with a small CalculatePilot attribution link, or go white-label: your brand, no attribution, one license for all your domains.

    • All 159 calculators, unlimited embeds
    • Works on WordPress, Webflow, Squarespace, Wix and plain HTML
    • Runs in your visitor's browser, so nothing is sent to a server
    • License key emailed automatically after checkout, cancel anytime
    $7.99 / month
    or $89.99 / year · white-label Pro
    Get the white-label license Embed free with attribution