Type 2 + 3 × 4 into any calculator and it answers 14, not 20. The calculator did not read your expression left to right — it sorted the operations by priority first. That sorting is the order of operations, a fixed set of rules every expression calculator applies before it shows you a single digit.
Knowing those rules is the difference between trusting a result and being quietly surprised by it. Here is exactly what happens between the moment you press equals and the moment a number appears.
The priority ladder a calculator climbs
Every standard calculation follows the same four-rung ladder, usually memorized as PEMDAS in the US or BODMAS elsewhere. The calculator resolves the top rung completely, then moves down:
- Parentheses (brackets) — anything inside
( )is computed first, working from the innermost pair outward. - Exponents (orders) — powers and roots, such as
3²or√9. - Multiplication and division — handled together as a single rung, not two.
- Addition and subtraction — also a single rung shared by both.
So in 2 + 3 × 4, the multiplication rung outranks the addition rung: the calculator computes 3 × 4 = 12, then 2 + 12 = 14. The plus sign was typed first, but it was evaluated last.

The rule almost everyone gets wrong
The letters in PEMDAS suggest multiplication comes before division, and addition before subtraction. It does not. Multiplication and division share one rank, and addition and subtraction share another. When two operations of equal rank sit side by side, the calculator breaks the tie by working left to right.
This matters more than it looks. Consider 16 ÷ 4 ÷ 4. Reading left to right, a calculator computes (16 ÷ 4) ÷ 4 = 1 — not 16 ÷ (4 ÷ 4) = 16. The same applies to 10 − 4 + 2, which is (10 − 4) + 2 = 8, never 4. Under the standard order-of-operations convention, operations of equal precedence are always evaluated from left to right.
Where exponents and parentheses sit
Exponents are settled before any multiplication or division, so 2 + 3² becomes 2 + 9 = 11. Stacked exponents have their own quirk: they are right-associative, meaning the calculator works top-down. The calculator above converts the ^ key to the JavaScript power operator, which evaluates 2^3^2 as 2^(3²) = 2⁹ = 512 — not (2³)² = 64.
Parentheses are the one tool that overrides the entire ladder. Wrapping part of an expression forces it to the front of the queue: (2 + 3) × 4 = 20 instead of 14. The scientific functions follow the same logic — sin, log, and √ each resolve whatever sits inside their own brackets before that result rejoins the expression.
How this calculator applies the order of operations
The tool above is an expression calculator: instead of acting on each keystroke as you press it, it reads the whole line you have built and evaluates it as a single expression. Internally it hands that expression to the browser's JavaScript engine, which applies precisely the precedence ladder described above. That is why 2 + 3 × 4 on the display returns 14 the instant you press equals.
One deliberate limitation is worth knowing: the calculator needs an explicit ×. Typing 2(3 + 4) will not be read as multiplication — you must enter 2 × (3 + 4). That extra keystroke is not an oversight; it sidesteps one of the most argued-about problems in arithmetic.
The famous ambiguity: 6 ÷ 2(1 + 2)
Expressions like 6 ÷ 2(1 + 2) go viral because calculators genuinely disagree. The culprit is implicit multiplication — two values placed next to each other with no symbol between them. Some machines give that juxtaposition a higher priority than ordinary division; others treat it as plain multiplication.
The split is well documented. An expression like 1/2x is interpreted as 1/(2x) by the TI-82 and many modern Casio models, but as (1/2)x by the TI-83 and every TI calculator released since 1996. Neither calculator is broken — the notation itself is ambiguous, and the only real fix is to add parentheses and state exactly what you mean.
Staying in control of the result
A few habits keep the order of operations working for you rather than against you:
- Add parentheses when in doubt — they cost nothing and remove every ambiguity, including the implicit-multiplication trap.
- Never assume multiplication beats division — they share a rank, so the calculator simply goes left to right.
- Watch the minus sign — most calculators read
−3²as−(3²) = −9; if you want the square of negative three, type(−3)². - Break long formulas into chunks — group each part in brackets rather than trusting one unbroken line.
- Estimate first — a rough mental answer catches the moment a precedence surprise sends the result far off.
Check yourself: enter 2 + 3 × 4 in the calculator above. A 14 means it is honoring the order of operations; if you expected 20, you were reading the line left to right instead of by priority.