Scientific Calculator: A Complete Guide to Every Function
From order of operations to trigonometry, logarithms, and powers — understand every button so you get the right answer the first time.
A scientific calculator is one of the most densely labelled tools a student or professional will ever pick up. Every button has a precise mathematical meaning, and pressing the right one in the wrong context produces an answer that looks plausible but is completely wrong. This guide explains, in plain language, what every major function does, the rules that govern how they interact, and the traps most people fall into. You can follow along with the free Scientific Calculator on sourcecodestack — it runs entirely in your browser, no sign-up needed, with a safe expression parser that never calls JavaScript's eval().
What a Scientific Calculator Does (and Why It Differs from a Basic One)
A basic four-function calculator handles addition, subtraction, multiplication, and division. A scientific calculator adds a whole layer of mathematical functions used in algebra, trigonometry, statistics, calculus, physics, and engineering. These include:
- Trigonometric functions: sin, cos, tan
- Inverse trig (arcsin, arccos, arctan — often labelled sin⁻¹, cos⁻¹, tan⁻¹)
- Logarithms: natural log (ln) and base-10 log (log)
- Square root (√) and arbitrary roots
- Powers and exponents (xʸ, x², 10^x, e^x)
- Mathematical constants π and e
- Factorial (n!)
- Percentage and modulo operations
- Parentheses for grouping
The key difference is that a scientific calculator evaluates full mathematical expressions rather than performing one operation at a time. Type 2 + 3 × 4 and it correctly returns 14, not 20, because it applies the standard order of operations throughout the entire expression.
Order of Operations: PEMDAS / BODMAS
The most fundamental rule governing every calculation is the order of operations. In North America the acronym is PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction). In the UK and many other countries it is called BODMAS or BIDMAS (Brackets, Orders, Division, Multiplication, Addition, Subtraction). The underlying mathematics is identical.
The hierarchy, from highest priority to lowest, is:
- Parentheses / Brackets — innermost brackets are evaluated first, then outer ones. Example:
(2 + 3) × (4 − 1)= 5 × 3 = 15. - Exponents / Orders / Powers — evaluated right-to-left when stacked. Example:
2^3^2= 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64. - Multiplication and Division — equal priority, evaluated left to right. Example:
12 / 4 × 3= (12 / 4) × 3 = 3 × 3 = 9. - Addition and Subtraction — equal priority, evaluated left to right. Example:
10 − 3 + 2= (10 − 3) + 2 = 7 + 2 = 9.
A scientific calculator applies this hierarchy automatically. The implication: when in doubt, add parentheses. They never hurt and they make your intent unambiguous.
Trigonometric Functions: sin, cos, and tan
Trigonometry is concerned with the relationships between angles and side lengths in triangles. The three primary functions extend beyond triangles through the unit circle — a circle of radius 1 centred at the origin of a coordinate system.
Sine (sin)
For an angle θ in a right-angled triangle, sin(θ) is the ratio of the opposite side to the hypotenuse. On the unit circle, sin(θ) is the y-coordinate of the point at angle θ. Its value always lies between −1 and 1. Key benchmarks in degree mode: sin(0°) = 0, sin(30°) = 0.5, sin(90°) = 1, sin(180°) = 0, sin(270°) = −1.
Cosine (cos)
cos(θ) is the ratio of the adjacent side to the hypotenuse, or equivalently the x-coordinate on the unit circle. Like sine, its value is always between −1 and 1. It is the sine function shifted by 90°: cos(θ) = sin(θ + 90°). Key benchmarks: cos(0°) = 1, cos(60°) = 0.5, cos(90°) = 0, cos(180°) = −1.
Tangent (tan)
tan(θ) = sin(θ) / cos(θ). It represents the slope of the line from the origin to the point at angle θ on the unit circle. Unlike sine and cosine, tangent is unbounded — as the angle approaches 90° (or π/2 radians), cos approaches 0 and tan shoots to infinity. The function is undefined at exactly 90°, 270°, and any odd multiple of 90°. The sourcecodestack calculator guards against this and returns an error when the cosine of the argument is smaller than 10⁻¹⁰, preventing a silent division-by-zero.
Degrees vs. Radians — Why It Matters
This is the single most common source of wrong answers on a scientific calculator. Angles can be expressed in two units:
- Degrees — a full circle is 360°. A right angle is 90°. This is the intuitive everyday system.
- Radians — a full circle is 2π radians (approximately 6.283). A right angle is π/2 radians (approximately 1.5708). This is the system used in calculus and physics because the derivative of sin(x) in radians is simply cos(x) — a property that only holds when x is in radians.
The conversion formula is: radians = degrees × π / 180. To convert back: degrees = radians × 180 / π.
Practical impact: In DEG mode, sin(30) = 0.5. In RAD mode, sin(30) ≈ −0.9880. These are wildly different numbers. If your exam specifies that angles are in degrees and your calculator is set to RAD, every trig answer will be wrong. Always verify the mode before starting a calculation session. The sourcecodestack calculator shows DEG or RAD as a button in the top-right corner of the display — tap it to toggle.
Logarithms: ln vs. log
A logarithm is the inverse of an exponentiation operation. If b^x = y, then log_b(y) = x. Scientific calculators provide two logarithm bases by default.
Natural Logarithm (ln)
ln(x) is the logarithm with base e — Euler's number, approximately 2.71828. It is the most mathematically natural logarithm because the derivative of ln(x) is simply 1/x, and the integral of 1/x is ln(x). ln is used in:
- Continuous growth and decay models (compound interest, radioactive decay, population growth)
- Information theory (entropy calculations)
- Calculus (integration by parts, differential equations)
- Statistics (log-normal distributions, logistic regression)
Key values: ln(1) = 0, ln(e) = 1, ln(e²) = 2. The input must be strictly positive — ln(0) is negative infinity and ln of a negative number is undefined in real numbers.
Common Logarithm (log, base 10)
log(x) — without a subscript on most calculator buttons — is the base-10 logarithm. It answers the question: "to what power must I raise 10 to get x?" Key values: log(1) = 0, log(10) = 1, log(100) = 2, log(1000) = 3, log(0.1) = −1. It is used in:
- Decibel calculations in acoustics and electronics: dB = 10 × log(P₂/P₁)
- pH in chemistry: pH = −log[H⁺]
- Richter scale for earthquake magnitude
- Mantissa calculations in scientific notation
The relationship between the two: ln(x) = log(x) / log(e) ≈ log(x) / 0.4343, or equivalently log(x) = ln(x) / ln(10) ≈ ln(x) / 2.3026.
Square Root (√)
sqrt(x), or √x, is the non-negative number whose square equals x. It is equivalent to x^(1/2). For example: √9 = 3, √2 ≈ 1.4142, √100 = 10. Square root is undefined for negative real numbers (the result would be imaginary). The calculator returns an error if you attempt sqrt of a negative value.
Worked example — Pythagorean theorem: A right triangle has legs of length 3 and 4. The hypotenuse is sqrt(3² + 4²) = sqrt(9 + 16) = sqrt(25) = 5. Enter this as: sqrt(3^2 + 4^2) and press =.
Powers and Exponents: x², xʸ, and e^x
Squaring (x²)
The x² button is a one-tap shortcut that appends ^2 to the current expression. It raises the preceding value to the power of 2. Examples: 5² = 25, 12² = 144, 1.5² = 2.25. It is shorthand for multiplying a number by itself.
Arbitrary Powers (xʸ or ^)
The xʸ button (or the caret ^ in typed expressions) raises a base to any exponent. Examples: 2^10 = 1024, 3^4 = 81, 10^6 = 1,000,000. The exponent can be fractional — 8^(1/3) = 2 (cube root of 8) — or negative: 2^(−3) = 1/8 = 0.125. The exponentiation operator is right-associative, meaning 2^3^2 is parsed as 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64.
Euler's Number e as a Base
The constant e ≈ 2.71828 is available as a button. You can combine it with the power operator: e^2 ≈ 7.389, e^0.5 ≈ 1.6487. The exponential function e^x is the inverse of the natural logarithm ln — so ln(e^x) = x and e^(ln(x)) = x for any positive x.
Mathematical Constants: π and e
Both constants are inserted directly into expressions at full precision (using JavaScript's Math.PI = 3.141592653589793 and Math.E = 2.718281828459045).
- π (pi) — the ratio of a circle's circumference to its diameter. Used constantly in geometry, trigonometry, and physics. Area of a circle: π × r². Circumference: 2 × π × r. Full circle in radians: 2π.
- e (Euler's number) — the base of natural logarithms. Arises naturally in compound interest, population growth, radioactive decay, and the solution of many differential equations. The function e^x is its own derivative — a unique and important property.
Example: The area of a circle with radius 7 cm is π × 7² = π × 49 ≈ 153.94 cm². Enter: pi*7^2 and press =.
Parentheses and Grouping
Parentheses override the default order of operations. Whatever is inside brackets is evaluated first, regardless of the operators surrounding the brackets. They are also required when passing arguments to functions: sin(45), log(1000), sqrt(2). The calculator on sourcecodestack inserts an opening parenthesis automatically when you press a function button, so you only need to type the argument and close with ).
Parentheses are also used for complex denominators in fractions. To compute (3 + 5) / (2 × 4), type (3+5)/(2*4) = 8/8 = 1. Without parentheses, 3+5/2*4 = 3 + (5/2 × 4) = 3 + 10 = 13 — a very different result.
Factorial (n!)
The factorial of a non-negative integer n, written n!, is the product of all positive integers up to and including n. By definition, 0! = 1. Examples: 3! = 3 × 2 × 1 = 6, 5! = 120, 10! = 3,628,800. Factorials grow extremely quickly — 20! is already over 2 quintillion. They appear in:
- Combinatorics — the number of ways to arrange n distinct objects is n!
- Binomial coefficients (combinations and permutations)
- Taylor series expansions: e^x = 1 + x + x²/2! + x³/3! + …
- Probability distributions (Poisson, binomial)
Percentage (%) and the Modulo Operation
On the sourcecodestack scientific calculator, the % button inserts the modulo operator into the expression. Modulo computes the remainder after integer division: 17 % 5 = 2 (because 17 = 3 × 5 + 2), 100 % 7 = 2 (because 100 = 14 × 7 + 2).
Modulo is useful in programming, clock arithmetic, and number theory. To calculate a traditional percentage — e.g., 15% of 200 — enter 200 * 15 / 100 = 30, or equivalently 200 * 0.15 = 30.
Quick Reference: All Functions at a Glance
| Button / Syntax | What it does | Example | Result |
|---|---|---|---|
| sin(x) | Sine of angle x (DEG or RAD) | sin(30) [DEG] | 0.5 |
| cos(x) | Cosine of angle x | cos(60) [DEG] | 0.5 |
| tan(x) | Tangent of angle x; undefined at 90° | tan(45) [DEG] | 1 |
| ln(x) | Natural logarithm (base e) | ln(e) | 1 |
| log(x) | Common logarithm (base 10) | log(1000) | 3 |
| sqrt(x) | Square root; undefined for negative x | sqrt(144) | 12 |
| x^2 | Square (x raised to the power 2) | 7^2 | 49 |
| x^y | Arbitrary power; right-associative | 2^10 | 1024 |
| pi | Constant π ≈ 3.14159… | 2*pi | 6.28318… |
| e | Euler's number ≈ 2.71828… | e^2 | 7.38905… |
| a % b | Remainder after dividing a by b | 17 % 5 | 2 |
| abs(x) | Absolute value of x | abs(-7) | 7 |
Worked Examples
Example 1 — Compound Interest
A principal of $1,000 is invested at an annual rate of 5%, compounded annually, for 10 years. The final amount is A = P × (1 + r)^n.
1000 * (1 + 0.05)^10 = 1000 * 1.05^10 ≈ 1628.89
Enter 1000*(1+0.05)^10 in the Scientific Calculator and press = to get approximately $1,628.89.
Example 2 — Finding an Angle with Inverse Trig
A ladder leans against a wall. The ladder is 5 m long and its base is 2 m from the wall. What angle does it make with the ground?
cos(θ) = adjacent / hypotenuse = 2 / 5 = 0.4. Therefore θ = arccos(0.4). Most scientific calculators have a shift/2nd key that converts cos into cos⁻¹. The result is approximately 66.42° (in DEG mode).
Example 3 — Earthquake Magnitude
The Richter scale uses base-10 logarithms. If one earthquake has an amplitude 1000 times greater than another, the magnitude difference is log(1000) = 3 — three points on the Richter scale. Enter:
log(1000) = 3
Example 4 — Continuous Decay
A radioactive substance with a half-life of 5,730 years (carbon-14). What fraction remains after 10,000 years? The decay formula is A = A₀ × e^(−λt) where λ = ln(2) / half-life.
e^(-(ln(2)/5730)*10000) ≈ 0.2985
Approximately 29.85% of the original carbon-14 remains after 10,000 years.
Common Mistakes to Avoid
1. Wrong angle mode (DEG vs RAD)
Already discussed, but it bears repeating because it is responsible for a large share of wrong answers. Before any trig calculation, verify the mode displayed in the corner. If your problem states angles in degrees, the calculator must be in DEG mode.
2. Omitting parentheses around function arguments
Writing sin 30 instead of sin(30) is ambiguous. In some calculator implementations sin 30evaluates as sin(3) × 0 or causes an error. Always close the parenthesis after the argument.
3. Confusing ln and log
ln and log are different functions. ln(100) ≈ 4.605 while log(100) = 2. Using the wrong one in a chemistry pH calculation or decibel formula will give an incorrect result. If a textbook writes "log" without a base, check the context — in many science and engineering textbooks, an unsubscripted "log" means ln.
4. Implicit multiplication after parentheses
In algebra, 3(4 + 5) means 3 × (4 + 5) = 27. Many calculators do not support this implicit multiplication and will produce an error or wrong result. Always type the × operator explicitly: 3*(4+5).
5. Negative number inputs to sqrt or ln
sqrt(−4) and ln(−1) have no real-number answer. The calculator correctly returns an error rather than silently returning 0 or ignoring the sign. If you get an error on a square root, check whether you accidentally subtracted instead of added somewhere in the expression under the root.
6. Stacked exponents and associativity
2^3^2 is not (2^3)^2 = 64. The standard mathematical convention and the sourcecodestack calculator treat ^ as right-associative, so it evaluates as 2^(3^2) = 2^9 = 512. If you want the left-to-right interpretation, use parentheses: (2^3)^2.
7. Forgetting that division is left-to-right
12 / 4 × 3 is not 12 / (4 × 3) = 1. The division and multiplication operators have equal precedence and are evaluated left to right: (12 / 4) × 3 = 3 × 3 = 9. Write the denominator in parentheses if you intend the full denominator: 12 / (4 * 3).
Privacy and How the Calculator Works
The sourcecodestack Scientific Calculator is entirely client-side. No expression you type is ever sent to a server. This matters if you are working on sensitive calculations — financial models, research data, or exam practice. The expression evaluator uses a purpose-built three-stage pipeline: a tokenizer that breaks the input into numbers, function names, and operators; a shunting-yard algorithm that converts the infix expression into Reverse Polish Notation (RPN); and an RPN evaluator that computes the result. JavaScript's eval() is never called, so there is no risk of code injection through the input field.
Conclusion
A scientific calculator is only as useful as your understanding of what each button actually computes. The most impactful habits to develop are: always verify DEG vs RAD before trig calculations; use parentheses liberally to make grouping explicit; know the difference between ln and log; and remember that the order of operations applies throughout the entire expression, not just locally. With those four habits, the other functions — powers, roots, constants, and factorials — are straightforward to apply correctly.
Open the free Scientific Calculator and try the worked examples above. There is no account required, nothing is stored, and the calculator works on any device with a browser.