🧰 ToolPicoAll Tools →
HomeBlogHow to Calculate sin, log, and Factorials Online

How to Calculate sin, log, and Factorials Online (Without Getting the Angle Mode Wrong)

If you've ever typed sin(90) into a calculator and gotten a strange decimal instead of a clean 1, you were almost certainly in the wrong angle mode. Here's how a free online scientific calculator handles trigonometry, logarithms, factorials, and a few other functions people search for most.

In this guide

A scientific calculator is really several small tools bundled into one keypad: trigonometry, logarithms, exponents and roots, factorials and counting functions, and usually some way to handle very large or very small numbers. Most of the confusion people run into isn't the math itself — it's forgetting to set the right mode before typing an expression. Below are the four areas that generate the most "why is my answer wrong" moments, plus what a well-built online tool does under the hood to avoid them.

Trig and the degree/radian/grad trap

Quick answerPick the angle mode before you calculate. In degree mode, sin(30) = 0.5. In radian mode, that same key expects radians, so sin(30) gives a completely different (and usually meaningless-looking) number. To get sin(30°) = 0.5 in radian mode you'd need sin(π/6) instead.

This is the single most common source of "the calculator is broken" complaints, and it's almost never the calculator. A full circle is 360 degrees, 2π radians (≈6.2832), or 400 grad — three different rulers for measuring the same angle. A good online scientific calculator puts DEGREE / RADIAN / GRAD as visible tabs above the keypad rather than burying the setting in a menu, specifically so you can double-check it in the two seconds before you hit equals.

Inverse trig works the same way, just backwards: asin, acos, and atan take a ratio (a number between −1 and 1 for asin/acos) and return an angle in whatever mode is currently selected. So asin(0.5) returns 30 in degree mode but 0.5236 in radian mode — same underlying angle, different units. Hyperbolic functions (sinh, cosh, tanh and their inverses) are unrelated to circles and angle mode entirely; they're defined in terms of e, so they behave identically no matter which angle tab is active.

sin, cos, tan for common angles (degree mode)
Anglesincostan
010
30°0.50.86600.5774
45°0.70710.70711
90°10undefined

tan is undefined at 90° and 270° because cosine is 0 there (division by zero); a calculator will typically show this as a very large number due to floating-point rounding rather than a true error.

log vs ln vs log2 — which one do you actually want?

Quick answerlog is base 10 (log(1000) = 3 because 10³ = 1000). ln is the natural logarithm, base e ≈ 2.71828 (ln(e) = 1). log2 is base 2 (log2(8) = 3 because 2³ = 8). For any other base, use a base-conversion function like logn(base, number), e.g. logn(3, 81) = 4.
Why the confusion: "log" means different things in different fields. In most calculators and general math it's base 10. In computer science, "log" is very often shorthand for log2 because binary doubling shows up everywhere (data structures, algorithm complexity). In calculus and higher math, an unlabeled "log" sometimes even means the natural log. When in doubt on a specific tool, check which key is labeled ln versus log rather than assuming.

A worked example: suppose you're estimating how many times you'd need to double a value to go from 1 to 1,000,000 (a hypothetical scenario, not a real financial or scientific claim) — that's log2(1,000,000) ≈ 19.93, so about 20 doublings. Swap to log(1,000,000) = 6 and you get the base-10 answer instead: six powers of ten. Same number, two very different-looking results, because the base changed.

Factorial, permutations, and combinations

Quick answerFactorial multiplies a whole number down to 1: 5! = 5×4×3×2×1 = 120, and by definition 0! = 1. Permutation (order matters): nPr(5,2) = 20. Combination (order doesn't matter): nCr(5,2) = 10. Both nPr and nCr are built on factorial under the hood.

Factorial only makes sense for 0 and positive whole numbers — there's no "half a factorial" on a standard scientific calculator. It grows extremely fast: 10! = 3,628,800 already, and 20! is over 2 quintillion, which is why factorial buttons are usually paired with scientific-notation display for larger inputs.

Factorials for 1–10
nn!
11
5120
75,040
103,628,800

A classic example that trips people up: how many ways can you draw 6 numbers out of 49 in a lottery, where the order they're drawn in doesn't matter? That's a combination, nCr(49,6) = 13,983,816. If order did matter — say, ranking the top 6 out of 49 candidates in exact 1st-through-6th order — you'd use the permutation instead, nPr(49,6) = 10,068,347,520, a much larger number because every different ordering now counts separately.

Scientific notation and base-N conversion

Quick answerUse an EXP key to type numbers like 6.022×10²³ directly (type 6.022, press EXP, then 23). Switching to a BASE-N mode lets you type a number in decimal, binary, octal, or hex and see it converted into all four bases at once, plus run bitwise operations like AND, OR, XOR, and bit-shifts.

Scientific notation exists because very large or very small numbers are unreadable in plain decimal — nobody wants to count zeros in 602,200,000,000,000,000,000,000. Typing the exponent directly (rather than manually multiplying) also avoids rounding mistakes on the way in. On the output side, a calculator will typically switch to scientific notation automatically once a result gets large or small enough, e.g. displaying something like 1.23×10^18 instead of an eighteen-digit string.

Base-N mode is a separate, more specialized case aimed at anyone working with binary, hex color codes, or low-level bit operations: 1010 (binary) AND 0110 gives 0010, for instance. It's a different keypad and display layout from the trig/log keys, which is why it usually lives behind its own mode toggle rather than being mixed into the main scientific keypad.

Set your angle mode, type the expression, and get the result instantly — with history, memory, and a shareable link.

Try the free Scientific Calculator →

Frequently asked questions

How do you use a scientific calculator?
First choose the angle mode (degree, radian, or grad) if you'll use trigonometry. Type the expression using the keypad or your keyboard — function keys open a parenthesis automatically (e.g. sin(), exponent uses ^, factorial uses !. Use parentheses to set operation precedence and press =. The result is shown large, added to the history, and can be reused in the next calculation with Ans.
What's the difference between log and ln?
Both are logarithms, but with different bases. log usually means base-10 logarithm: log(1000) = 3 because 10³ = 1000. ln is the natural logarithm, with base e ≈ 2.71828: ln(e) = 1. This tool also has a log2 (base-2) key: log2(8) = 3. For any other base, use the logn(base, number) function.
What is factorial (n!) and how is it calculated?
Factorial is the product of a positive integer with every smaller positive integer down to 1: n! = n × (n−1) × … × 2 × 1. For example, 5! = 5×4×3×2×1 = 120. By definition, 0! = 1. Type the number and press n!. Factorial is only defined for 0 and positive integers; permutation (nPr) and combination (nCr) are both built on factorial.
How do you calculate permutations (nPr) and combinations (nCr)?
A permutation is an ordered selection: nPr = n! / (n−r)!. A combination is an unordered selection: nCr = n! / (r! × (n−r)!). Press the nPr or nCr key, then type the n value, a comma, then the r value — e.g. nPr(5,2) = 20 and nCr(5,2) = 10. Example: the number of possible combinations for a 6-number lottery drawn from 49 numbers is nCr(49,6) = 13,983,816.
Is this online calculator safe — is my data sent anywhere?
Yes. This scientific calculator runs entirely in your browser (client-side). The expressions and results you enter are never sent to a server — every calculation happens on your device. History is kept only for the current page session. The code also avoids the unsafe eval function; expressions are processed with a dedicated parser (tokenizer + parser). It even works offline once the page has loaded.
A note on accuracy: All examples above (lottery odds, doubling estimates, angle tables) are illustrative worked examples for learning purposes, not financial, statistical, or professional advice. Calculators compute with standard IEEE-754 double-precision floating point, so extremely large or small results may round in the last visible digit — this is normal and not a bug.