DIY Cost Tools
Scientific Calculator
MATH CALCULATOR
Evaluate arithmetic expressions with powers, parentheses, common functions, and the constants pi and e.
Supported: + − * / ^, parentheses, pi, e, sqrt, abs, sin, cos, tan, ln, log. Trigonometric inputs use radians.
How it works
A small parser reads numbers, operators, constants, functions, and parentheses in standard precedence order. It never executes code from the input.
Formula
Operations follow order of operations: parentheses and functions, powers, multiplication or division, then addition or subtraction.
Worked example
sqrt(144) + sin(pi ÷ 2) × 8 equals 12 + 1 × 8, so the result is 20.
Important limits
- Trigonometric functions use radians, not degrees.
- Very large or very small floating-point results can include rounding.
- The parser supports the listed functions only; implicit multiplication such as 2pi is not supported.
Frequently asked questions
How do I enter a square root?
Use sqrt(value), such as sqrt(81).
How do I calculate base-10 logarithms?
Use log(value). Use ln(value) for the natural logarithm.
Getting reliable scientific-calculator results
Use parentheses to make the intended order of operations explicit, especially in expressions with fractions, powers, or several functions. Enter scientific notation carefully and review the full expression before calculating. This calculator’s trigonometric functions use radians, so convert degree values to radians when necessary.
Common input checks
- Use explicit multiplication where required; for example, enter 2*pi rather than 2pi.
- Keep logarithm inputs positive and check that square-root inputs are valid for real-number results.
- Separate function arguments with parentheses, such as sqrt(81) or sin(pi/2).
- Expect small rounding differences for very large, very small, or repeating decimal results.
For important work, estimate the expected size and sign of the answer first, then repeat the calculation with a second method. A plausible-looking result can still be wrong when a parenthesis, angle unit, or exponent is entered incorrectly.
Sources and review notes
The calculation follows conventional arithmetic precedence and JavaScript’s IEEE 754 floating-point arithmetic. Last reviewed September 29, 2026.