How it’s calculated
Type a whole expression and the calculator works it out in the standard order of operations (brackets, then exponents and roots, then multiplication and division from left to right, then addition and subtraction from left to right). It uses its own safe parser, so only the maths symbols below are understood.
| Precedence (highest first) | Operators |
|---|---|
| 1 | Brackets ( ) and function arguments |
| 2 | Factorial n! |
| 3 | Power ^ (right to left: 2^3^2 = 2^9 = 512) |
| 4 | Unary minus: −2^2 = −(2^2) = −4; write (−2)^2 for 4 |
| 5 | × ÷ and implicit multiplication (left to right) |
| 6 | + − |
- Implicit multiplication: 2π, 3(4), 2sin(30) and (1+2)(3+4) multiply. It has the same rank as ×, so 1/2π means (1 ÷ 2) × π, not 1 ÷ (2π). Add brackets when in doubt; the “Read as” line shows how it was understood.
- Functions: sqrt (or √), cbrt, abs, sin, cos, tan, asin, acos, atan, ln (natural log), log (base 10), log2, exp (e to a power). Write brackets: sin(30). √ may be followed by a number or constant (√16) or brackets.
- Constants: pi (π) and e. A number followed directly by e and digits is scientific notation, so 2e3 is 2000; write 2×e or 2 e for twice e.
- Angles: pick degrees or radians. Trig results are shown as exactly 0 when the angle is a multiple of 180° (or π), so sin(180°) = 0, while genuinely tiny angles like sin(1e-13) are left alone.
- Not supported: percent signs (write 0.5 × 80 instead of 50% × 80), commas, and variables.
- Errors, not nonsense: dividing by zero, √(−1), ln(0), asin(2), tan(90°) and factorials of non-integers or above 170 give a message instead of a number.
Example: 2 × (3 + 4)^2 − √16. Brackets first: 3 + 4 = 7. Then the exponent: 7² = 49. Then × : 2 × 49 = 98. √16 = 4. Finally 98 − 4 = 94.
Frequently asked questions
Why is −2^2 equal to −4 and not 4?
Exponents are done before the minus sign, so −2^2 means −(2^2) = −4. To square negative two, write (−2)^2 = 4.
Is 6 ÷ 2(1 + 2) equal to 9 or 1?
This calculator treats implicit multiplication like ×, working left to right: 6 ÷ 2 = 3, then 3 × 3 = 9. The “Read as” line shows this. Write 6 ÷ (2(1 + 2)) if you want 1.
How do I switch between degrees and radians?
Use the Angle mode drop-down. In degrees, sin(30) = 0.5. In radians, sin(30) is about −0.988.
What is 0^0?
This calculator returns 0^0 = 1, the usual convention in algebra and computing. 0 to a negative power is a division by zero and gives an error.
Is anything I type sent anywhere or run as code?
No. The expression is read by a small built-in parser in your browser and never evaluated as code or sent to a server.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Algebra and Trigonometry 2e, §1.1 Real Numbers: Algebra Essentials (order of operations) — OpenStax
- Prealgebra 2e, §3.4 Multiply and Divide Integers (order of operations) — OpenStax
- Algebra and Trigonometry 2e, §7.2 Right Triangle Trigonometry (sine, cosine, tangent) — OpenStax
- Algebra and Trigonometry 2e, §8.3 Inverse Trigonometric Functions — OpenStax
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator