Scientific Calculator

Free Scientific Calculator online for advanced mathematical calculations. Perform trigonometric, logarithmic, exponential, and complex math operations quickly.

Scientific Calculator
DEG M 2nd
0
0
Angles
More functions
History
    Type an expression or use the keypad — both drive the same parser, so 2π+sin(45)^2 works exactly as if you had pressed the keys. The result under your expression updates as you go; pressing = commits it to the history and makes it available as Ans. Everything is calculated in your browser and nothing is sent anywhere.

    How to use the scientific calculator

    Step 1 — Type it or tap it

    Write the whole thing in the box — 2π+sin(45)^2 — or press the keys, or mix the two. Both feed the same parser, so there is no difference in what you get.

    Step 2 — Watch the answer as you go

    The large figure under your expression updates while you type. An unfinished expression shows a quiet ellipsis rather than an error, so nothing shouts at you mid-calculation.

    Step 3 — Set the angle unit first

    Degrees, radians or gradians, shown in the corner of the display. It matters: sin(30) is 0.5 in degrees and about −0.988 in radians, and no calculator can guess which you meant.

    Step 4 — Reach the rest with 2nd

    2nd swaps the trigonometry keys for their inverses, √ for cube root, x² for x³ and ln for eⁿ. It reverts after one use, so you cannot get stranded in the wrong layer.

    Step 5 — Press = to commit

    The calculation joins the history and the answer becomes Ans, ready for the next line. If something is wrong, the message says what — “a bracket was opened and never closed” rather than just “Error”.

    Step 6 — Reuse anything

    Click any line in the history to put it back in the box, use M+, M− and MR for a running total, and Copy result to take the answer elsewhere.

    About the scientific calculator

    A full scientific calculator that runs entirely in your browser: trigonometry in three angle units, logarithms to any base, powers and roots, factorials, combinations, hyperbolic functions, statistics, and the gamma and beta functions. Free, no sign-up, nothing sent anywhere.

    It reads your expression the way mathematics does

    This is the part that matters and the part most free calculators get wrong. The expression is broken into tokens and parsed by a grammar — not pattern-matched and handed to the browser to run. The practical consequences:

    • Precedence is standard. 2+3×4 is 14, not 20.
    • Powers group to the right. 2^3^2 is 29 = 512, not 82 = 64.
    • Unary minus behaves mathematically. −2^2 is −4, because the power binds tighter than the minus sign.
    • Multiplication can be implied. 2π, 3(4+5) and 2sin(30) all work without an explicit ×.
    • Scientific notation is a number, not two. 1E5 is 100,000 and 1E-3 is 0.001.
    • Errors are specific. “A logarithm needs a number above zero”, “sin⁻¹ only works between −1 and 1”, “division by zero has no answer”.

    The conventions it follows, so you can check them

    • Percent is contextual. 200+10% gives 220 — ten percent of 200. On its own, 50% is 0.5.
    • mod is floored. 15 mod 4 is 3, −15 mod 4 is 1, and 15 mod −4 is −1 — the result always takes the sign of the divisor, which is the mathematical convention. Many programming languages answer differently.
    • Angles convert on the way in and on the way out. In degrees, asin(0.5) gives 30; in radians it gives 0.5236.

    Trigonometric functions — the full guide

    Choose the angle unit before anything else

    Every trigonometric answer depends on which unit your angle is in, and the calculator cannot infer it. The current unit is shown in the corner of the display and switched with the three buttons beside the keypad.

    Unit A full circle Use it for
    Degrees 360° School geometry, navigation, construction, most everyday work. The default.
    Radians 2π ≈ 6.283 Calculus, physics, programming. Any formula involving derivatives assumes radians.
    Gradians 400 grad Surveying, and some European engineering coursework. A right angle is exactly 100.

    The same angle in the three units: 45° = 0.785398 rad = 50 grad, and all three give a sine of about 0.7071.

    The three basic functions

    Function What it gives Example (degrees) Result
    sin(x) Opposite ÷ hypotenuse sin(45) 0.707107
    cos(x) Adjacent ÷ hypotenuse cos(45) 0.707107
    tan(x) Opposite ÷ adjacent tan(45) 1

    In radians the same calls read differently: sin(0.5) is 0.479426, cos(1) is 0.540302 and tan(1) is 1.55741. In gradians, sin(50) is 0.707107 and cos(200) is exactly −1.

    The inverse functions, and the answers they can give

    Inverse trigonometry runs the other way: you supply a ratio and get back an angle. Each one has a restricted input range and a restricted output range, because otherwise infinitely many angles would qualify.

    Function Input must be Answer lies in Example Result
    asin(x) −1 to 1 −90° to 90° asin(0.3) 17.4576°
    acos(x) −1 to 1 0° to 180° acos(0.3) 72.5424°
    atan(x) anything −90° to 90° atan(2) 63.4349°

    Ask for asin(1.5) and the calculator says “sin⁻¹ only works between −1 and 1” rather than returning nothing useful — a sine can never exceed 1, so the request itself is impossible.

    On the keypad, press 2nd and the sin, cos and tan keys become sin⁻¹, cos⁻¹ and tan⁻¹. Typing asin(, acos( or atan( does the same thing.

    Why tan sometimes refuses

    Tangent is sine divided by cosine, so wherever the cosine is zero the value has no limit — the graph shoots off to infinity. That happens at 90°, 270° and every 180° after. Asking for tan(90) gives “tan(90°) is undefined — the line is vertical there”.

    Near the asymptote the values are genuine but enormous: tan(89.9999) is 572,957.8. In radians the same protection applies, because π/2 cannot be stored exactly and would otherwise return a meaningless 1.6×1016 dressed up as an answer.

    Hyperbolic functions

    These share the names of the trigonometric functions but describe a hyperbola rather than a circle. They appear in catenary curves (a hanging chain), special relativity, and the solutions of certain differential equations. They take a plain number, not an angle, so the angle unit makes no difference to them.

    Function Definition Example Result
    sinh(x) (ex − e−x) ÷ 2 sinh(2) 3.62686
    cosh(x) (ex + e−x) ÷ 2 cosh(2) 3.7622
    tanh(x) sinh(x) ÷ cosh(x) tanh(2) 0.964028
    asinh(x) inverse of sinh, any input asinh(2) 1.44364
    acosh(x) inverse of cosh, input ≥ 1 acosh(2) 1.31696
    atanh(x) inverse of tanh, input between −1 and 1 atanh(0.5) 0.549306

    acosh(0.5) is refused, because cosh never produces a value below 1. atanh(1) is refused too — tanh approaches 1 but never reaches it, so its inverse has no answer there.

    Worked example

    A ladder 6 m long leans against a wall at 72°. How high does it reach, and how far is its foot from the wall?

    • Height: 6sin(72) → 5.70634 m
    • Distance from wall: 6cos(72) → 1.85410 m
    • Check the angle from those two: atan(5.70634/1.85410) → 72.00002°, the rounding in the two figures above showing up in the last digits

    Note the implicit multiplication in 6sin(72) — no × needed.

    Statistical functions — the full guide

    How to enter your numbers

    Every statistical function takes a list, separated by commas, with no limit on how many: mean(12,15,11,19,14). The whole line stays in your history, so you can click it, change one number and run it again — which is what makes a result checkable.

    The previous version of this page worked differently: you entered numbers one at a time, pressing equals after each, and they accumulated in a hidden dataset. That is gone. You could not see what was in the dataset, every unrelated calculation joined it, and nothing could be reproduced afterwards.

    The functions

    All the examples below use the same eight numbers — 2, 4, 4, 4, 5, 5, 7, 9 — which is the standard textbook set for demonstrating standard deviation.

    Function What it gives Example Result
    mean(...) The average: total ÷ count mean(2,4,4,4,5,5,7,9) 5
    median(...) The middle value once sorted; the average of the middle two when the count is even median(5,3,8,1) 4
    sum(...) Everything added together sum(1,2,3,4,5,6,7,8,9,10) 55
    product(...) Everything multiplied together product(1,2,3,4,5) 120
    min(...) / max(...) Smallest and largest min(3,-2,8) −2
    variance(...) Population variance variance(2,4,4,4,5,5,7,9) 4
    stdev(...) Population standard deviation stdev(2,4,4,4,5,5,7,9) 2
    variances(...) Sample variance (divides by n−1) variances(2,4,4,4,5,5,7,9) 4.57143
    stdevs(...) Sample standard deviation stdevs(2,4,4,4,5,5,7,9) 2.13809

    Population or sample? The one decision that matters

    Standard deviation measures spread, and there are two versions of it. The difference is the divisor, and it is not cosmetic: for the eight numbers above, the answers are 2 and 2.13809.

    • Population (stdev, variance) divides by n. Use it when your numbers are the whole group you care about — the marks of everyone in the class, the weights of all twelve boxes.
    • Sample (stdevs, variances) divides by n−1. Use it when your numbers are a sample drawn from something larger and you are estimating the spread of that larger thing — forty customers out of thousands, ten measurements from a production run.

    Sample figures are always slightly bigger, because dividing by a smaller number corrects for the fact that a sample tends to under-represent the true spread. Most coursework and research uses the sample version; most descriptive summaries of a complete set use the population one. If a question does not say, it usually wants the sample figure.

    A sample needs at least two numbers — stdevs(5) is refused, because a single observation cannot tell you anything about spread.

    Working through a set by hand

    For 2, 4, 4, 4, 5, 5, 7, 9:

    1. Mean = 40 ÷ 8 = 5
    2. Differences from the mean: −3, −1, −1, −1, 0, 0, 2, 4
    3. Squared: 9, 1, 1, 1, 0, 0, 4, 16 — total 32
    4. Population variance = 32 ÷ 8 = 4; standard deviation = √4 = 2
    5. Sample variance = 32 ÷ 7 = 4.57143; standard deviation = 2.13809

    Counting arrangements: nCr and nPr

    Related to statistics and endlessly needed in probability questions.

    • nCr(n,r) — combinations, where order does not matter. nCr(52,5) is 2,598,960, the number of possible five-card poker hands.
    • nPr(n,r) — permutations, where order does matter. nPr(10,3) is 720: the ways to award gold, silver and bronze among ten runners. The same ten and three as combinations gives nCr(10,3) = 120, exactly six times fewer, because each set of three can be ordered in 3! = 6 ways.

    Both need whole numbers that are not negative. Asking for more than you have — nCr(3,5) — correctly gives 0.

    Special functions — the full guide

    gamma(x) — the factorial, extended

    Factorials are only defined for whole numbers: 5! is 5×4×3×2×1. The gamma function fills in everything between, and it is the standard tool for doing so in statistics, physics and analysis.

    The relationship to remember is Γ(n) = (n−1)! — note the shift by one:

    Call Result Why
    gamma(6) 120 = 5! — the argument is one more than the factorial
    gamma(0.5) 1.77245 = √π, the classic result. Check it: √(π) gives the same digits
    gamma(3.5) 3.32335 Halfway between 2! = 2 and 3! = 6, but not at the midpoint — the curve is not linear
    gamma(-0.5) −3.54491 = −2√π. Negative arguments work, and the sign alternates

    To get the factorial of a non-whole number, use gamma(x+1): the “factorial of 0.5” is gamma(1.5) = 0.886227.

    Where it stops. The gamma function has poles at zero and at every negative whole number — the value runs to infinity there — so gamma(0) and gamma(-2) are refused with an explanation rather than returning something meaningless. Values are computed with the Lanczos approximation, accurate to about fifteen digits across the range this calculator displays.

    beta(x, y) — the two-argument relative

    The beta function is built from gamma: B(x,y) = Γ(x)Γ(y) ÷ Γ(x+y). It appears in probability — the beta distribution is named after it — and in integrals of the form xa(1−x)b.

    beta(3,4) gives 0.0166667, which is exactly 1/60. Both arguments must be above zero; beta(0,1) is refused.

    logy(value, base) — a logarithm to any base

    The keypad has log for base 10 and ln for base e, and the function list adds log2. For anything else there is logy:

    • logy(243,3) → 5, because 35 = 243.
    • logy(1024,2) → 10, the same as log2(1024).
    • The value must be above zero, and the base must be above zero and not 1 — a base of 1 raised to any power is always 1, so it can never reach another number.

    gcd and lcm — whole-number helpers

    • gcd(48,18) → 6, the largest number dividing both. Use it to reduce a fraction: 48/18 becomes 8/3.
    • lcm(21,6) → 42, the smallest number both divide into. Use it to put fractions over a common denominator, or to work out when two repeating events coincide.

    rand() — a random number

    Returns a number from 0 up to (but never reaching) 1, and it takes no arguments — write the empty brackets. Combine it with floor to get whole numbers in a range:

    • floor(rand()×6)+1 → a die roll, 1 to 6.
    • floor(rand()×100)+1 → 1 to 100.
    • rand()×10+20 → a decimal between 20 and 30.

    It uses the browser’s own generator, which is fine for games, sampling and teaching — but is not suitable for lotteries, cryptography or anything where the result carries value.

    Factorials, and where they stop

    7! is 5,040 and 10! is 3,628,800. Factorials grow faster than almost anything else in mathematics: 170! is about 7.26×10306, and 171! exceeds what any browser can hold, so the calculator says so instead of printing infinity. Factorials need whole numbers that are not negative — for anything else, use gamma(x+1).

    Nothing is sent anywhere

    Every calculation is done by JavaScript inside this page. Nothing is uploaded, no history is stored on a server, and closing the tab clears it. There is no account, no limit and no advertisement interrupting the keypad.

    Where this fits with the other tools

    For a single percentage question, Percentage Calculator shows the working step by step. Unit Converter handles units rather than arithmetic, EMI Calculator and Compound Interest Calculator cover money over time, and Mean, Median & Mode Calculator gives a fuller statistical summary of a list of numbers.

    Frequently asked questions

    Is this scientific calculator free?

    Completely — no account, no limits, and it works offline once the page has loaded.

    Can I type instead of clicking?

    Yes. The box under the display takes a whole expression, and Enter is the same as pressing equals. The keypad simply writes into the same box.

    How do I switch between degrees and radians?

    The three buttons beside the keypad, and the current unit shows in the corner of the display. Gradians are there too, for surveying and some European coursework.

    Why does my sine answer look wrong?

    Almost always the angle unit. sin(30) is 0.5 in degrees but −0.988 in radians — both correct, for different questions. Check the unit in the corner of the display before anything else.

    Why does −2^2 give −4 and not 4?

    Because the power is applied before the minus sign, which is the standard mathematical reading: −2² means −(2²). For the square of −2, write (−2)^2, which gives 4.

    What does 2^3^2 mean?

    2(32) = 29 = 512. Powers group from the right, which is the convention in mathematics.

    How do I enter a very large or very small number?

    Use the EXP key or type E: 6.02E23 is Avogadro’s number and 1E-9 is a nanometre in metres.

    What does the % key do exactly?

    On its own it divides by 100, so 50% is 0.5. After a plus or minus it is read as a percentage of the first number, so 200+10% is 220 and 200−10% is 180.

    Why is −15 mod 4 equal to 1?

    Because the result takes the sign of the divisor, the mathematical definition of the modulo operation. Programming languages including JavaScript and C answer −3 instead. 15 mod −4 gives −1 here, for the same reason.

    Which standard deviation should I use?

    stdev when your numbers are the entire population you care about; stdevs when they are a sample from something larger, which is the usual case in coursework and research. For 2,4,4,4,5,5,7,9 the two answers are 2 and 2.13809.

    How do I calculate the cube root of a negative number?

    Use cbrt(-8), which gives −2. Writing it as (-8)^(1/3) is refused, because raising a negative number to a fractional power has no real answer in general — the cube root is a special case that cbrt handles properly.

    Can it do factorials of large numbers?

    Up to 170!, after which the answer exceeds what any browser can hold and the calculator says so. For non-whole numbers use gamma(x+1).

    Does it keep a history?

    The last twenty calculations, in the panel beside the keypad. Click any of them to load it back into the box. The history lives in the page only and disappears when you close the tab.

    What is Ans for?

    It holds the last result you committed with equals, so you can carry on from it: press equals, then Ans×2. Memory keys (M+, M−, MR, MC) keep a separate running total.