Free Online Calculator: Basic and Scientific
Two calculators in one: basic mode for the four operations, percent and square root; scientific mode for trigonometry, logarithms, exponentials, powers and the memory keys. The two tabs switch the keypad; the current expression is kept.
Every operation is added to the session history below the keypad, so a chain of steps can be checked without reconstructing it from memory. That history lasts as long as the tab does and disappears when the tab is closed — nothing is sent to or kept on the servers.
Calculator
Session history
The arithmetic runs in the browser, not on the servers — which is what makes it instant, with no page reload. This is the exception to the site's rule, where topic calculators compute server-side; it is reserved for utility tools of this kind.
How to use it
Keyboard as much as mouse
Digits, . and ,, the operators + − * /, Enter for the result, Backspace to fix the last character, Delete to clear the entry and Esc to reset everything.
The percent key behaves like a pocket calculator
After an addition or subtraction, 200 + 10 % adds 10 % of 200, giving 220. Used on its own, it simply divides by 100.
Degrees or radians
The small DEG / RAD button under the display switches the angle unit used by the trigonometric functions. The last choice is kept for the whole session.
Memory keys, for parking a result
M+ adds the displayed value to memory, M− subtracts it, MR recalls it and MC clears it. An M marker lights up under the display while memory holds anything.
The same calculator everywhere on the site
The calculator icon at the top of every page, next to the search box, opens the same tool in a window without leaving the page being read. It really is the same one: display and history match this page exactly.
Terms followed by an asterisk are explained in the glossary.
How this calculator reads an expression
A cheap four-function pocket model often evaluates as keys are pressed: 2 + 3 × 4 becomes 20, because 2 + 3 was already 5 before the × arrived. This page does not work that way. It writes a full expression, shows that line above the display, and only then evaluates at =.
That is the scientific habit, not the cash-register habit. The pending line is the contract. Until =, nothing is committed except the characters on that line. A mid-expression correction is a Backspace on the line, not an undo of a running total.
Basic and scientific modes share that engine. The extra keys (trig, logs, powers, memory) change what can be typed. They do not change when the arithmetic happens. The mathematics topic calculators on this site are the other doctrine: they run on the server, after a form is posted. This keypad is the documented exception, on purpose, so a chain of scratch arithmetic does not reload the page.
Operator precedence, including PEMDAS and powers
2 + 3 × 4 is 14. Not 20. Multiply first, then add. US classrooms brand that order PEMDAS* (parentheses, exponents, multiplication and division, addition and subtraction). UK textbooks often say BIDMAS or BODMAS, with I/O for indices. Same ranking, different acronym.
The line above the display is what will be evaluated. At = the order is:
- Parentheses, innermost group first
- Powers (^), right to left: 2^3^2 means 2^9, not 8²
- Multiplication and division, left to right
- Addition and subtraction, left to right
Right-to-left powers are the usual mathematical convention (tetration-style stacking). A left-to-right reading of 2^3^2 would be 8² = 64; this engine does 2^9 = 512. Multiplication and division sit on one level: 8 ÷ 2 × 4 is 16, not 1. PEMDAS’s written “MD” does not mean “all multiplications before all divisions.” It means those two operations, left to right, before + and −.
Basic or scientific, same rule. The extra keys are the only difference. Not how 2 + 3 × 4 is read.
Parentheses and implied grouping
( and ) on the scientific pad group work. (2 + 3) × 4 is 20 because the sum is forced ahead of the product. Nesting peels from the inside: (2 + (3 × 4)) − 5 is the same as on paper. An unclosed bracket is closed at =, instead of being rejected. That is a convenience, not a licence to lose count of opens and closes in a long line.
Functions bind tightly. sin 30 + 1 in degree mode is (sin 30) + 1 = 1.5, not sin 31. A sine of a sum wants parentheses: sin(30 + 60). Implied multiplication after a parenthesis, 2(3+4), is 14. The computer keyboard still hears ( ) in basic mode, where there is no on-screen button for them — useful when a grouped sum is needed without switching tabs.
Why 0.1 + 0.2 is not always 0.3
Machines store decimals in base 2. 0.1 and 0.2 have no exact slot there, the way 1/3 is never exactly 0.333… in base 10. Internally the sum is sometimes 0.30000000000000004. That value is real. The display rounds to 12 significant digits, so the noise vanishes in almost every case that matters on a keypad, and the precision that actually matters is kept.
This is IEEE floating point*, not a bug in the keys. 0.1 + 0.2 − 0.3 may print a tiny residue rather than a clean zero. Money that must be exact to the penny belongs in integer cents, or in a decimal type a spreadsheet can offer, not in binary fractions. For a physical estimate — a sine, a logarithm, a root — 12 significant digits is already more than the input was worth.
Integer arithmetic below the factorial overflow (below) is exact until the magnitude leaves what a float can represent as an integer. 2 + 2 is 4, not 3.999. The 0.1 problem is about dyadic fractions, not about all arithmetic.
Degrees, radians, and the missing gradian
DEG / RAD under the display sets the unit for sin, cos, tan and their inverses. Degrees, 360 to a turn: school geometry, charts, theodolites, the triangle solver. Radians, 2π to a turn: physics and calculus, where the derivative of sin x is cos x only in radians.
Gradians (gons), 400 to a turn, hang on in a few surveying offices, a leftover of early metric days. They are not on this keypad. Too little day-to-day use for a third switch. A 100 gon right angle is 90° is π/2 rad; converting outside the pad is safer than a hidden mode that nobody notices.
The usual fault is a degree value fed to a radian-mode sine: sin 30 in radians is about −0.988, not 0.5. The button under the display is small on purpose, and easy to forget. A sanity check for a known angle (sin 30°, cos 60°) takes a second and saves a page of wrong work.
Natural log versus common log
ln is the logarithm in base e ≈ 2.71828, the log of analysis: continuous growth, radioactive decay, differential equations. log on this pad is base 10, the common logarithm. Each step is a factor of ten. pH, decibels, earthquake magnitude, orders of magnitude on a log plot.
US calculators are not unanimous: some label log as ln, some offer log2. Here the two buttons are ln and log, natural and common. Change of base is the usual identity: logb a = ln a / ln b. There is no log2 key; two ln presses and a division do it.
ln and e^x are inverses. log and 10^x are inverses. Mixing the pairs — ln then 10^x — is not an identity. The inverse trig keys on the scientific pad follow the same idea: arcsin after sin, in the same DEG/RAD mode, returns an angle in the principal range, not necessarily the original angle plus 360°.
Memory keys inherited from desktop machines
One slot, as on those old mechanical desks. M+ adds the displayed value, M− subtracts it, MR recalls it, MC clears it. The slot outlives the next sum. An M marker lights under the display while anything is stored. Totalling a list in any order, or parking a halfway result while a side calculation runs, is the whole point — without a scrap of paper.
It is not a stack. There is no M2. A second quantity that must be kept belongs in the session history, or in a spreadsheet cell. Recalling with MR does not clear the slot; MC does. Adding with M+ onto a forgotten leftover is the classic error: MC first, then the new total.
Scientific notation on the display
Above 1012, below 10−9, the display switches to scientific notation*. Avogadro’s number, 6.022 × 10²³, lands as 6.022141e+23. Before the e: the mantissa. After: the power of ten. No unreadable parade of zeros either way.
e+23 means × 1023, not the constant e. The constant e is the ln inverse, typed as e^x. Reading 1.5e−4 as “one and a half e minus four” is a common stumble; it is 0.00015. Engineering notation (exponents in multiples of three) is not a separate mode here. SI prefixes do that job in the head: e+6 is mega, e−3 is milli.
Factorials and where floating point gives up
n! is 1 × 2 × … × n. 5! = 120. 10! = 3,628,800. Past 170! the value leaves what an IEEE 754 float can hold (about 1.8 × 10308). The pad reports an error, not a chopped figure or an infinity dressed as a number.
Non-integer factorial is the gamma function, Γ(n+1). This keypad does not offer it. 4.5! is not a keystroke here. Combinatorics that need n! / (k!(n−k)!) for large n should not multiply the factorials first and divide after: the intermediates overflow even when the binomial coefficient itself is modest. A spreadsheet or a dedicated combinatorics page is then the right tool.
The quadratic equation page already met cancellation; factorial overflow is the other wall of the same house: a real mathematical value that this machine cannot store.
Keyboard shortcuts
Digits, . or , for the decimal point, + − * / ^, parentheses ( ), Enter or = for the answer, %, Backspace to fix, Delete to wipe the entry, Esc to start over. Hands stay on the keys. A comma is accepted as a decimal separator so a European keyboard does not have to hunt for a period; thousands separators are not part of the input line.
The physical keypad and the on-screen pad are the same engine. Mixing them in one expression is fine. The session history records the evaluated line, not which key was a mouse click.
When a spreadsheet is the better tool
One sum, a short chain watched on screen: this is the tool. Once the work repeats down a column, has to last overnight, or has to be sent to someone else, a spreadsheet is better. That keeps the formula, not just the number at the bottom. Recalculation when one input changes is then free. This pad has no cells and no named inputs.
Topic calculators on the site — a special product, a triangle, a solar angle — are the other alternative: one job, labelled fields, a result table. Scratch arithmetic that does not deserve a named page belongs here. A named quantity with units and a method belongs on its own calculator.
Percent after addition is not the same as × 1.10
On this pad, as on most pocket calculators, 200 + 10% means 200 + 10% of 200 = 220. 200 × 10% is 20. A trailing % after + or − is “that percentage of the first operand.” A % on its own, or after × or ÷, is divide-by-100. That is inherited behaviour, not algebra. In algebra, 200 + 10% is not even a well-typed expression.
A 10% increase written as × 1.1 is unambiguous and survives a spreadsheet. A chain 200 + 10% + 10% is 242 on a pocket machine (10% of 220 the second time), not 240. Compound percent is easy to misread. When the difference matters, write × 1.1 × 1.1, or use a percentage calculator that states the rule in a labelled field.
Inverse trig and the principal value
arcsin, arccos, arctan return one angle, the principal value*. arcsin 0.5 is 30° in degree mode, not 150°, even though sin 150° is also 0.5. arccos is 0° to 180°. arctan runs (−90°, 90°). Recovering a full-circle heading from two components is atan2, which this pad does not expose as a key; the spherical coordinates converter uses atan2 internally for that reason.
sin(arcsin x) is x, for x in [−1, 1]. arcsin(sin θ) is not always θ: sin 210° is −0.5, arcsin of that is −30°. The identity fails as soon as θ leaves the principal range. That is not a defect of the keys. It is the price of a single-valued inverse.
Session history versus a paper tape
Each completed = appends a line under the pad: expression and result. The list lasts as long as the tab. Closing the tab clears it. Nothing is posted to the servers; the arithmetic never left the browser. That is closer to a printing calculator’s paper tape than to a saved file. It is not an audit log, and it does not survive a crash of the tab.
The popup calculator behind the header icon shares that history through sessionStorage. A result produced here is visible there, and the other way around, inside the same browser tab session. Two different browsers, or a private window, are different tapes.
Copying a result into a named tool — the quadratic solver, a trigonometry page — is still a manual step. The history is a memory aid, not a pipe between calculators.
Glossary
- PEMDAS
- A US school acronym for operator order: Parentheses, Exponents, Multiplication and Division (same level, left to right), Addition and Subtraction (same level, left to right). UK equivalents are BIDMAS and BODMAS. This engine also evaluates stacked powers from the right: 2^3^2 = 2^9.
- IEEE floating point
- The binary format almost every processor uses for non-integer arithmetic (IEEE 754). Many decimals, including 0.1 and 0.2, have no exact representation, so a rounded display can hide a tiny residue. It is not a keypad error.
- Scientific notation
- A number written as a mantissa times a power of ten, shown here with an e: 6.022141e+23 means 6.022141 × 1023. The display switches to this form above 1012 and below 10−9.
- Principal value
- The single angle an inverse trig function returns, by convention: arcsin in [−90°, 90°], arccos in [0°, 180°], arctan in (−90°, 90°). Other angles with the same sine or cosine exist; they are not printed.