to navigate Enter to open Esc to close

Scientific Calculator: Full Expression Entry & History

Calculation History
© 2026 numeros.pro

Type the whole expression and it evaluates properly — brackets, operator precedence, nested functions. Most online scientific calculators are button chains that work left to right and return 1.22e-16 for sin(180°). This one parses what you wrote, and returns exactly 0 where the answer is exactly 0.

Scientific Calculator

Live
Result
0

Type directly or use the keys. Enter evaluates, Esc clears, recalls the previous expression. ans refers to your last result.

History 0
Click any history line to load it back into the input. Nothing is uploaded — history lives in this tab only.

Why sin(180°) should be exactly zero

Ask most online calculators for sin(180) in degree mode and they return 1.2246467991473532e-16. The correct answer is zero, and the discrepancy is not a rounding preference — it is an artefact of how the calculation was performed.

The usual approach: radians = 180 × π / 180 Since π is stored to finite precision, this is not exactly π — it is 3.141592653589793. sin() of that is 1.2246e-16, not 0. This calculator: Checks whether the degree input is a multiple of 180 before converting, and returns exact 0. Same for cos(90), tan(0) and the other exact points.

It matters beyond tidiness. Feed 1.22e-16 into a further calculation and it propagates; divide by it and you get 8×10¹⁵ instead of an error. A calculator that quietly returns near-zero where the answer is zero is producing wrong results with confident-looking formatting.

Exact values this calculator returns correctly

ExpressionExact answerWhat most tools return
sin(180)01.2246e-16
cos(90)06.1232e-17
tan(180)0−1.2246e-16
tan(90)Undefined1.6331e+16 — a finite number, which is worse than an error
sin(30)0.50.49999999999999994 in some implementations

The tan(90) case is the most dangerous. The true value is undefined — the function has a vertical asymptote there. Returning 1.63×10¹⁶ looks like an answer, and a spreadsheet or script downstream will happily use it. This calculator returns "undefined" and explains why.

Four expressions where calculators disagree: minus two squared is minus four, two to the three to the two is 512, and sine of thirty is a half only in degree mode FOUR EXPRESSIONS THAT SPLIT CALCULATORS EXPRESSION CORRECT COMMONLY WRONG WHY −2² −4 4 Squaring binds tighter than the minus sign 2^3^2 512 64 Exponents group right to left: 2^(3^2) sin(30) 0.5 −0.988 Degrees, not radians — check the mode indicator sin(180) 0 1.2×10⁻¹⁶ Floating point residue, not a real value This calculator parses the whole expression before evaluating it, so precedence and associativity are applied the way mathematics defines them rather than in the order the buttons were pressed.
A button-chain calculator evaluates as you type and cannot look ahead, which is why it computes 1 + 2 × 3 as 9. A parser reads the whole line first, builds a tree, and gets 7.

Operator precedence, and why button-chain calculators get it wrong

A calculator that evaluates as you press keys cannot apply precedence, because it has already committed to the earlier operation before it sees the later one:

ExpressionCorrectSequential calculator
2 + 3 × 41420 — adds first, then multiplies
2 + 3 × 4²50400 in some implementations
−3²−99 — the minus is not part of the base
2 ^ 3 ^ 251264 — exponentiation is right-associative

The last two catch people constantly. −3² is −9, because exponentiation binds tighter than the unary minus: you square 3, then negate. And 2^3^2 is 512, not 64, because towers of exponents evaluate from the top down — 3² is 9, then 2⁹.

This calculator parses the full expression before evaluating anything, so precedence, associativity and brackets all work as they do in written mathematics.

Degrees or radians?

ModeUse forNote
DegreesGeometry, navigation, construction, most school workThe default here. A full circle is 360
RadiansCalculus, physics, anything involving derivatives of trig functionsA full circle is 2π. Required for the standard derivative results to hold

Getting this wrong is the most common source of trigonometry errors, and it produces answers that look plausible rather than obviously broken. sin(30) is 0.5 in degrees and −0.988 in radians. Both are valid numbers; only one answers your question. The mode is displayed permanently above the keypad for that reason.

A rule of thumb: if your problem came from a geometry diagram, use degrees. If it came from a calculus course or a physics formula, use radians — the derivative of sin(x) is only cos(x) when x is in radians.

The implicit multiplication argument

One expression has no settled answer, and knowing that is more useful than picking a side:

6 ÷ 2(1 + 2)

Strict left-to-right for × and ÷: 6 ÷ 2 × 3 = 9
Implicit multiplication binding tighter: 6 ÷ (2 × 3) = 1

ConventionAnswerWho uses it
Left to right9Most programming languages, spreadsheets, and this calculator
Implicit binds tighter1Many physics and engineering journals, and several Casio models
Refuse to answerMathematicians, usually. The expression is ambiguous as written

The honest answer is that the expression is badly written. No convention is wrong; they are different conventions, and a formula that depends on which one a reader assumes should be rewritten with brackets. If you are checking someone else’s work and the answers differ by this, the notation is the bug.

Why floating point produces 1.2×10⁻¹⁶

Computers store numbers in binary, and most decimal fractions have no exact binary form. The classic demonstration is that 0.1 + 0.2 does not equal 0.3 in almost any language:

ExpressionNaive resultWhat it should be
0.1 + 0.20.300000000000000040.3
sin(180°)1.2246×10⁻¹⁶0
tan(45°)0.99999999999999991
√2 × √22.00000000000000042

None of these is a bug in the hardware — they are the correct answers for the number format. This calculator returns the exact value at the special angles where mathematics has one, because a student checking that sin(180°) is zero should see zero rather than a number in scientific notation they then have to interpret.

Never test floating point results for equality. In code, if (x == 0.3) fails for values that are 0.3 for every practical purpose. Compare against a tolerance instead. The same caution applies to any calculator output ending in a long run of nines or zeros.

Common mistakes

Leaving the calculator in the wrong angle mode. The single biggest source of trigonometry errors, and the results look reasonable rather than absurd — which is why they survive to the final answer. Check the mode before every trig calculation, not after you get a number you dislike.
Assuming −3² is 9. It is −9. Exponentiation binds more tightly than the unary minus, so you square first and negate second. If you want the square of negative three, write (−3)² — the brackets are not optional, they change the answer.
Rounding partway through a calculation. Each rounding introduces error, and errors compound through a chain of steps. Carry full precision until the final answer, then round once to the significant figures your inputs justify. This calculator keeps full precision internally and rounds only for display.
Reporting every digit the calculator shows. Fifteen significant figures implies a precision your measurements almost certainly do not have. If you measured to three significant figures, report three. Extra digits are not extra accuracy — they are a claim you cannot support.

Frequently asked questions

Why do other calculators give 1.22e-16 for sin(180)?

Because they convert 180 degrees to radians by multiplying by π/180, and π cannot be stored exactly in binary. The converted value is very slightly off from true π, and the sine of that is a tiny non-zero number rather than zero. This calculator checks for exact multiples before converting and returns 0, which is both correct and safe to use in further calculations.

Is −3² equal to 9 or −9?

−9. Exponentiation has higher precedence than the unary minus, so the expression means "the negative of three squared" rather than "negative three, squared". To get 9 you must write (−3)². This is a genuine convention rather than a quirk, and it is consistent across mathematics, spreadsheets and programming languages.

What does 2^3^2 evaluate to?

512, not 64. Exponentiation is right-associative, so a tower evaluates from the top down: 3² is 9, then 2⁹ is 512. Reading it left to right gives 8² = 64, which is wrong. If you intend the left-to-right reading, write (2^3)^2 explicitly.

Why does tan(90) say undefined instead of giving a number?

Because it is undefined — tangent has a vertical asymptote at 90 degrees, where cosine is zero and the division is by zero. Calculators that return 1.63×10¹⁶ are reporting the consequence of floating point imprecision as though it were a result, and anything downstream will treat that huge number as legitimate. An explicit "undefined" is the honest output.

Degrees or radians — which should I use?

Degrees for geometry, navigation and most school work. Radians for calculus and physics, because the standard derivative and series results only hold in radians — the derivative of sin(x) is cos(x) only when x is measured that way. If your problem came from a diagram, degrees; if it came from a formula involving derivatives, radians.

Can I reuse a previous result?

Two ways. Type ans anywhere in an expression to insert your last result at full internal precision — not the rounded display value, which matters for chained calculations. Or click any line in the history panel to load that expression back into the input for editing.

How many digits of precision does it carry?

Roughly fifteen significant figures internally, which is standard double-precision floating point. Display is rounded to twelve to remove artefacts like 0.30000000000000004, and you can set fewer significant figures if that suits your work. Full precision is always carried into the next calculation via ans.

Is my calculation history stored?

Only in the open tab. Nothing is transmitted to a server, nothing persists after you close the page. Use Copy or Print if you need to keep a record.

Related calculators

See the full list of Math calculators, or try: