What is a square root?
The square root of a number n is the value that, when multiplied by itself, gives you n. The square root of 9 is 3, because 3 · 3 = 9. The square root of 144 is 12, because 12 · 12 = 144. The square root undoes the squaring operation — if you square 5 to get 25, the square root of 25 brings you back to 5. Written with the radical sign, the square root of n looks like √n. Written with an exponent, it is n^(1/2). They mean the same thing.
Every positive number has two square roots: one positive and one negative. (-3) · (-3) = 9 just as 3 · 3 = 9. Most calculators (this one included) return the positive root, which mathematicians call the principal square root. When you see √9 = 3 written somewhere, that is shorthand for the principal root. If both signs matter — solving x² = 9 for example — the full answer is x = ±3, and you write the ± yourself.
Square roots show up everywhere. The Pythagorean theorem uses one to find the hypotenuse of a right triangle. Standard deviation is the square root of variance. Free-fall time is a square root of distance. The quadratic formula has one front and center. Anywhere you need to walk back from "this thing squared" to "this thing," you reach for a square root.
How to use the Square Root Calculator
The Square Root Calculator takes one input and returns four values: the square root, the cube root, the square (n²), and the cube (n³). All four update as you type.
- Enter a non-negative number. Decimals, integers, very large numbers, very small numbers — all fine.
- Read √n in the result block. If n is a perfect square (1, 4, 9, 16, 25, 36, …), you get an exact integer. Otherwise you get a decimal.
- The cube root, square, and cube are calculated alongside as a convenience — they share most of the same use cases.
Negative inputs are rejected. The square root of a negative number is imaginary and lives off the real number line — this calculator handles real numbers only. If you need complex-number roots, you need a different tool. Inputs stay in your browser; nothing is sent anywhere.
Worked example
Take √144. You are asking: what number multiplied by itself equals 144? Walk through candidates:
- 10 · 10 = 100 — too small
- 11 · 11 = 121 — still too small
- 12 · 12 = 144 — exactly right
- 13 · 13 = 169 — too big
So √144 = 12 exactly. 144 is a perfect square: 12 times itself lands on 144 with no decimal tail. The calculator returns 12, no rounding, no approximation.
Now try √150. The same walk gives 12 · 12 = 144 and 13 · 13 = 169, so the answer lives between 12 and 13. The calculator returns 12.2474487139…, an irrational number with infinite non-repeating decimals. Most real-world inputs land in this irrational bucket. Perfect squares are rare — between 100 and 200 there are exactly three (100, 121, 144, 169 — well, four if you count 169).
The defining identity: √n = n^(1/2). The radical sign and the 1/2 exponent are interchangeable notation. The Square Root Calculator uses JavaScript's Math.sqrt under the hood, which is functionally equivalent to Math.pow(n, 0.5) but slightly faster and more numerically stable.
Irrational roots — when the decimal never ends
The square root of 2 is the classic example. Pythagoras's students reportedly discovered it (the legend says one of them was drowned at sea for revealing the secret — the early Pythagoreans took numerical aesthetics seriously). √2 = 1.41421356237309504880168872420969807856967187537694…, and the decimals never repeat or terminate. No fraction p/q with integer p and q equals √2 exactly. That is what "irrational" means: cannot be written as a ratio of integers.
The proof is short and worth knowing. Suppose √2 = p/q in lowest terms (no common factors). Then 2 = p²/q², so p² = 2q². That means p² is even, so p is even, so write p = 2k. Substitute: (2k)² = 2q², so 4k² = 2q², so q² = 2k². Now q² is even, so q is even. But we said p/q was in lowest terms with no common factors — and now both p and q are even, contradiction. So no such fraction exists. √2 is irrational. The same argument works for the square root of any non-square integer.
Most square roots are irrational. The exceptions are the perfect squares (n² for integer n). Everything else gives you a non-repeating decimal. The calculator displays up to 10 decimal places, which is enough precision for any practical use — buildings, surveying, satellite trajectories all work fine at 10 digits.
How computers compute square roots — Newton and Babylon
Modern CPUs have a dedicated square root instruction (fsqrt on x86, fsqrt.d on ARM) that returns a correctly-rounded IEEE 754 double in a handful of clock cycles. Underneath, the instruction uses a hardware version of Newton's method, which has a delightful history — the algorithm was used in Babylonian clay tablets four thousand years before Isaac Newton was born.
The Babylonian method (also called Heron's method, also called Newton's method applied to f(x) = x² − n): to find √n, guess any positive starting value x₀. Improve the guess with x₁ = (x₀ + n/x₀) / 2. Repeat. Each iteration roughly doubles the number of correct digits. The math is simple: x₁ is the average of x₀ and n/x₀. If x₀ is too small, n/x₀ is too big, and their average is closer to the truth. If x₀ is too big, n/x₀ is too small, same averaging effect.
Try it for √10 starting from x₀ = 3:
- x₁ = (3 + 10/3) / 2 = (3 + 3.333) / 2 = 3.1667 — already 3 digits correct
- x₂ = (3.1667 + 10/3.1667) / 2 = (3.1667 + 3.1579) / 2 = 3.1623 — 4 digits correct
- x₃ = (3.1623 + 10/3.1623) / 2 = 3.16227766 — 8 digits correct
- x₄ matches √10 = 3.16227766017… to double precision after one more pass
Quadratic convergence — every step roughly doubles the correct digits. Four iterations from a bad starting guess gets you a 16-digit answer. That is why Math.sqrt is fast.
Square roots of 1 through 20
Worth memorizing the small ones. Bold rows are perfect squares (exact integers); the rest are irrational and shown to 6 decimals:
| n | √n | n | √n |
|---|---|---|---|
| 1 | 1 | 11 | 3.316625 |
| 2 | 1.414214 | 12 | 3.464102 |
| 3 | 1.732051 | 13 | 3.605551 |
| 4 | 2 | 14 | 3.741657 |
| 5 | 2.236068 | 15 | 3.872983 |
| 6 | 2.449490 | 16 | 4 |
| 7 | 2.645751 | 17 | 4.123106 |
| 8 | 2.828427 | 18 | 4.242641 |
| 9 | 3 | 19 | 4.358899 |
| 10 | 3.162278 | 20 | 4.472136 |
Four perfect squares (1, 4, 9, 16) in the first twenty integers; the next is 25. The gaps widen — between 100 and 200 there are only three perfect squares (100, 121, 144, 169), between 1000 and 2000 there are nine, and the density keeps dropping. Most numbers you actually meet have irrational square roots.
Where square roots show up
A few of the everyday places:
- Geometry — the Pythagorean theorem. The hypotenuse of a right triangle with legs a and b is √(a² + b²). The square root is the final step that turns the squared-sum into a length.
- Statistics — standard deviation. Variance is the average of squared deviations. Standard deviation is the square root of variance, which restores the original units. A salary variance of "10,000 dollars squared" is meaningless; a standard deviation of 100 dollars is a sentence.
- Physics — free fall. Time to fall distance d under Earth gravity is √(2d/g). Drop a watermelon from 20 meters: √(40/9.8) ≈ 2.02 seconds before impact.
- Finance — volatility. Annualized volatility from daily returns multiplies by √252 (252 trading days per year). The square root scaling is what statisticians call the "square-root-of-time rule."
- Photography — f-stops. Each f-stop doubles the area of the aperture, so the linear ratio between f-stops is √2 ≈ 1.414. That is why the standard f-stop scale (1.4, 2, 2.8, 4, 5.6, 8, 11, 16) increases by factors of √2.
- Quadratic formula. x = (-b ± √(b² − 4ac)) / 2a. The square root inside the discriminant decides whether the equation has two real roots, one, or none.
Related calculators
The Square Root Calculator covers the most common case. For related or more general work:
- Root Calculator — handles any n-th root, not just n=2. Use this when you need cube roots, fourth roots, or higher.
- Pythagorean Theorem Calculator — the most common everyday application of √. Finds the hypotenuse of a right triangle without making you compute the square root yourself.
- Exponent Calculator — the inverse operation. Raise a number to any power, including fractional powers if you want to do roots the long way.
Frequently asked questions
What is a square root?
The square root of a number n is the value x such that x · x = n. √144 = 12 because 12 · 12 = 144. √2 = 1.4142… because 1.4142² is approximately 2 (it is irrational, so the decimal never terminates). The calculator returns the principal (positive) square root; the negative square root exists too but is conventionally hidden.
Can I calculate the square root of a negative number?
Not in this calculator. The square root of a negative number is imaginary — √(-4) = 2i, where i is the imaginary unit (i² = -1). Imaginary numbers are useful in electrical engineering, signal processing, and quantum mechanics but live off the real number line. The Square Root Calculator handles real, non-negative inputs only.
Why does every positive number have two square roots?
Because squaring kills the sign. 3² = 9 and (-3)² = 9. So both 3 and -3 are square roots of 9. By convention, "√9" without qualification means the positive (principal) root, which is 3. If you are solving x² = 9 and need both signs, you write x = ±3. The calculator shows the principal root only.
How does the calculator handle perfect squares?
It calls Math.sqrt, gets back something like 11.999999999999998 for √144 due to floating-point rounding, then checks whether rounding to the nearest integer (12) and squaring (144) recovers the input exactly. If yes, the calculator displays the clean integer. If no, the decimal stands. The check is one extra multiplication per call and catches the common case where you typed a perfect square and would rather see "12" than "11.999999999999998."
How precise is the result?
JavaScript uses 64-bit IEEE 754 doubles, which give roughly 15-17 significant digits. The calculator displays up to 10 decimal places, which is well within that precision. For irrational roots like √2, the displayed digits are correctly rounded. For perfect squares the answer is exact. If you genuinely need more than 15 digits, you need an arbitrary-precision math library — but for any practical engineering, finance, or science use, 10 digits is far beyond what you can verify against the real world.
What is the difference between √n and n^(1/2)?
Notation only. They mean the same thing. The radical sign is older (medieval Arabic and European math); the fractional exponent is from algebraic notation that became standard in the 17th century. The fractional exponent generalizes better — you can write n^(2/3) for the cube root of n squared, which is awkward with radicals. Either form works.
How fast is the calculator?
Math.sqrt takes a few nanoseconds on modern hardware. The slow part is the keystroke, the React re-render, and the eye reading the result — the computation itself disappears into the noise. You can hold down a digit key and the result will keep up with no perceptible lag.
How do I square root a number by hand?
The fastest method is the Babylonian one: guess any positive starting value, then repeatedly replace your guess with the average of itself and (n divided by itself). Each iteration roughly doubles the correct digits. Four iterations from a rough guess will get you the answer to 10+ digits. The Square Root Calculator does the same thing in hardware — it just happens in nanoseconds instead of minutes.