Bisection Method Calculator
- The bisection method needs a sign change: f(2) = -1.000 and f(3) = 16.000 have opposite signs, so a root is trapped inside the bracket.
- Each step tests the midpoint and keeps the half that still brackets the sign change. The first three midpoints are 2.50000, 2.25000, 2.12500; the interval halves every time, whatever the function does.
- After 20 iterations the bracket is 9.54 x 10^-7 wide, so the midpoint is within 9.54 x 10^-7 of the true root - bisection trades speed for a guaranteed error bound.
- Root estimate: x = 2.09455 with f(x) = 0.00000. For faster convergence once you are close, feed this value to the Newton method calculator.
This bisection method calculator finds a root of a continuous function on an interval where the function changes sign. You enter the function and the bracket, and it repeatedly halves the interval, keeping the half where the sign change remains, until the root is pinned down to the accuracy you want. The results are concrete: the classic cubic x^3 - 2x - 5 on [2, 3] converges to 2.09455, and after 20 iterations the error is guaranteed under 9.54 x 10^-7. For x^3 - x - 2 on [1, 2], the calculator gives 1.52138 with the same 20-iteration bound of 9.54 x 10^-7. Running 30 iterations on x^3 - 4x + 1 over [0, 1] tightens the bound to 9.31 x 10^-10 and finds 0.25410.
The method is the accepted standard for this kind of calculation because its guarantee does not depend on a lucky starting guess or on how the function behaves between sample points. Every iteration halves the bracket, so accuracy is bought with iterations, never with luck: 10 iterations shrink any bracket by a factor of about 1,000. That predictable error bound is why the bisection method is trusted when a reliable answer matters more than speed. This page shows the formula, step-by-step workings, worked examples and sources, so you can follow each halving of the interval yourself and check the reported digits against the guaranteed bound.
Worked examples
Classic cubic
(1 · 0 · -2 · -5 · 2 · 3 · 20 iterations)
| Root estimate | 2.09455 |
| f(root) | 0.00000 |
| Error bound after 20 iterations | 9.54 x 10^-7 |
| Final bracket | [2.09455, 2.09455] |
Second cubic
(1 · 0 · -1 · -2 · 1 · 2 · 20 iterations)
| Root estimate | 1.52138 |
| f(root) | 0.00000 |
| Error bound after 20 iterations | 9.54 x 10^-7 |
| Final bracket | [1.52138, 1.52138] |
30 iterations
(1 · 0 · -4 · 1 · 0 · 1 · 30 iterations)
| Root estimate | 0.25410 |
| f(root) | -0.00000 |
| Error bound after 30 iterations | 9.31 x 10^-10 |
| Final bracket | [0.25410, 0.25410] |
How the bisection method works
The bisection method begins with a sign change. If a continuous function is negative at one point and positive at another, it must cross zero somewhere between them. The classic cubic x^3 - 2x - 5 gives a clean example on the interval [2, 3]: f(2) = -1 and f(3) = 16. Because the values have opposite signs, a root is trapped inside that bracket, and the bisection method calculator simply narrows the trap until the root is pinned down to whatever accuracy you need.
Each step halves the bracket and tests the midpoint. For x^3 - 2x - 5 on [2, 3], the first midpoint is 2.5. The function's sign at 2.5 tells you which half still contains the root, so the bracket becomes either [2, 2.5] or [2.5, 3]. The next midpoint is 2.25, then 2.125, then 2.0625, and so on. Every test discards one half of the remaining interval, and the midpoints march steadily toward 2.09455, the root of this cubic.
This is why the method is so dependable: every iteration halves the bracket, so accuracy is bought with iterations, never with luck. The guarantee holds no matter how the function behaves inside the interval, as long as it is continuous and the endpoints have opposite signs. Ten iterations shrink any bracket by a factor of about 1,000. After 20 iterations on [2, 3], the error is guaranteed under 9.54 x 10^-7, which is why the computed root lands at 2.09455.
The same arithmetic applies to any well-behaved function. On x^3 - x - 2 over [1, 2], the bracket collapses to 1.52138 with the same 20-iteration bound of 9.54 x 10^-7. Push further and the bound tightens fast: running 30 iterations on x^3 - 4x + 1 over [0, 1] tightens the guarantee to 9.31 x 10^-10 and finds 0.25410. The pattern is always the same — start with a sign change, halve, test the midpoint, and repeat until the interval is as small as you want.
- Start with a bracket where the function changes sign: f(2) = -1 and f(3) = 16 for x^3 - 2x - 5.
- Test the midpoint, keep the half that still contains the root, and repeat: 2.5, 2.25, 2.125, and onward toward 2.09455.
- Each iteration halves the bracket; 10 iterations shrink any bracket by a factor of about 1,000.
- After 20 iterations on [2, 3], the error is guaranteed under 9.54 x 10^-7.
Choosing a bracket that works
A bisection method calculator can only work with what you give it, and what you give it is a bracket: two x-values, one on each side of the root you are hunting. The single requirement is that the function has opposite signs at those two endpoints. If f(a) is negative and f(b) is positive, or the other way around, a root must lie between them for any continuous function, and the method has something to close in on. If both endpoints give the same sign, the bracket proves nothing, and no amount of halving will fix it.
The classic cubic x^3 - 2x - 5 on [2, 3] shows a healthy bracket. At x = 2 the polynomial is negative, at x = 3 it is positive, so the sign change is there and the method converges to 2.09455. After 20 iterations the error is guaranteed under 9.54 x 10^-7. A second example behaves the same way: x^3 - x - 2 on [1, 2] gives 1.52138 with the same 20-iteration bound of 9.54 x 10^-7. In both cases the endpoints straddle the root, and the guarantee follows from that alone, not from a lucky starting guess.
A wide bracket is legal but not free. Every iteration halves the bracket, so a wider starting interval simply means more halvings before you reach the accuracy you want. Accuracy is bought with iterations, never with luck: 10 iterations shrink any bracket by a factor of about 1,000. That rule holds regardless of the function, which is why a tighter valid bracket is usually the better choice. It also means you can predict the cost before you run anything. If you need an error under some tolerance and your bracket is a certain width, you can count the halvings required.
The 30-iteration example makes the trade visible. Running 30 iterations on x^3 - 4x + 1 over [0, 1] tightens the bound to 9.31 x 10^-10 and finds 0.25410. Compare that with the 20-iteration bound of 9.54 x 10^-7 from the earlier examples: the extra ten halvings buy roughly three more decimal places of guaranteed accuracy. None of that comes from the function being friendly; it comes from the bracket shrinking by half each time.
So when you set up a bisection method calculator, check the signs first. Evaluate the function at both endpoints and confirm one result is positive and the other negative. If they match, move an endpoint, because a bracket with no sign change proves nothing. Once the signs differ, widen or narrow the interval with the iteration count in mind: a wide bracket only costs extra iterations, and each one you add halves what is left.
- Endpoints must give opposite signs; a bracket with no sign change proves nothing.
- x^3 - 2x - 5 on [2, 3] converges to 2.09455; after 20 iterations the error is guaranteed under 9.54 x 10^-7.
- x^3 - x - 2 on [1, 2] gives 1.52138 with the same 20-iteration bound of 9.54 x 10^-7.
- 30 iterations on x^3 - 4x + 1 over [0, 1] tightens the bound to 9.31 x 10^-10 and finds 0.25410.
- Every iteration halves the bracket; 10 iterations shrink any bracket by a factor of about 1,000.
The error bound and how many iterations you need
The bisection method's appeal is that its accuracy comes with a guarantee, not a hope. After n iterations, the error is at most the original bracket width divided by 2^n. That single formula is why a bisection method calculator can tell you, before you run anything, how close your answer will be. The bracket never lies: each pass chops the interval in half, and the true root is trapped inside the surviving half every time.
Put numbers to the formula and the story gets concrete. On a bracket of width 1, 20 iterations guarantee an error under 9.54 x 10^-7. Run the classic cubic x^3 - 2x - 5 on [2, 3] and the method converges to 2.09455, with that same 20-iteration bound of 9.54 x 10^-7 covering the answer. The cubic x^3 - x - 2 on [1, 2] behaves identically: it returns 1.52138, again with the error guaranteed under 9.54 x 10^-7 after 20 iterations. Different functions, same promise, because the promise depends only on the bracket width and the iteration count.
Push to 30 iterations and the guarantee tightens dramatically. On x^3 - 4x + 1 over [0, 1], 30 iterations bring the bound down to 9.31 x 10^-10 and find 0.25410. Ten more iterations moved the bound by roughly three orders of magnitude, which is the pattern to remember: every extra iteration buys you one more binary digit of accuracy. Ten iterations alone shrink any bracket by a factor of about 1,000. Accuracy is bought with iterations, never with luck.
This is also the practical answer to "how many iterations do I need?" Decide the error you can tolerate, take the bracket width, and solve for n. If your starting bracket is wider than 1, the bound scales up proportionally, so a wider start simply costs more iterations for the same final precision. The formula stays the same; only the inputs change.
Keep two cautions in mind. The bound is a guarantee on the distance to a root inside the bracket, not proof that the root is the one you had in mind, so a bracket that contains more than one root will still converge, but possibly to a different one than expected. And the bound is worst-case: the actual error is often smaller, but you should never count on that when you report a result. Quote the guaranteed bound, not the lucky outcome.
- 20 iterations on a unit bracket: error guaranteed under 9.54 x 10^-7 (x^3 - 2x - 5 gives 2.09455; x^3 - x - 2 gives 1.52138).
- 30 iterations on a unit bracket: bound tightens to 9.31 x 10^-10 (x^3 - 4x + 1 over [0, 1] gives 0.25410).
- Each iteration halves the bracket and adds roughly one binary digit of accuracy; 10 iterations shrink any bracket by about a factor of 1,000.
- To size your run, divide the bracket width by 2^n and pick n so the result is below your target error.
Reading your result
A bisection method calculator does not just hand you a number — it hands you a number plus a promise. The promise is the error bound: the true root is guaranteed to lie within that distance of the estimate. That guarantee is what makes the result worth reading carefully. The decimals are a display; the bound is the actual result. When you see an estimate like 2.09455 next to a bound of 9.54 x 10^-7, the meaningful statement is that the root of x^3 - 2x - 5 on [2, 3] sits within about one millionth of 2.09455. The calculator has not merely guessed well; it has proved how close it must be.
This is where bisection differs from faster methods. A Newton iterate can look more precise — more digits, quicker arrival — but its error is not certified by the computation itself. You have to check it separately, and near a flat spot or a poor starting point it can be badly wrong while looking confident. The bisection output carries its own certificate. Trust the bound, not the decimals: 2.09455 is certified to within the stated bound, and no further verification of that claim is needed.
The same reading applies to every problem the calculator solves. For x^3 - x - 2 on [1, 2], the estimate is 1.52138 with the same 20-iteration bound of 9.54 x 10^-7. For x^3 - 4x + 1 over [0, 1], running 30 iterations tightens the bound to 9.31 x 10^-10 and finds 0.25410. Notice what changed between those two results: not the method, only the number of iterations. More iterations buy a smaller bound, and the bound is the thing to compare when you decide whether a result is good enough for your purpose.
That relationship is predictable, which is the quiet strength of the method. Every iteration halves the bracket, so accuracy is bought with iterations, never with luck. Ten iterations shrink any bracket by a factor of about 1,000, regardless of the function, the starting interval, or how badly behaved the curve is in between. You can plan your tolerance in advance: decide how small an error you can accept, then run enough iterations to drive the bound below it.
When you read a result from a bisection method calculator, do three things in order. First, find the bound and treat it as the true measure of quality. Second, check that the estimate and bound are consistent with the interval you entered — a bound much larger than expected usually means too few iterations. Third, if you need more precision, do not hunt for a better-looking number; add iterations and watch the bound fall. The digits may change; the guarantee is what you rely on.
FAQs
How does the bisection method find a root?
It halves a bracket that straddles a sign change, keeping the half that still changes sign. Each step cuts the interval in half, so the root stays trapped inside. In the classic example, 20 halvings reach 2.09455 for x^3 - 2x - 5, a close approximation to the actual root.
Why does bisection need a sign change?
Opposite signs at the endpoints guarantee a root inside by the intermediate value theorem. In the classic example, f(2) = -1 and f(3) = 16, so the function must cross zero somewhere between 2 and 3. Without that sign change, bisection has nothing to narrow toward.
How accurate is bisection after 20 iterations?
The error is at most the starting width divided by 2^20. For a unit-width bracket, that bound is 9.54 x 10^-7, so after 20 halvings you are within about one millionth of the true root. The guarantee holds regardless of how the function behaves between the endpoints.
How many iterations do I need for 6 decimal places?
About 20 for a unit bracket, since 2^20 is roughly a million. If you need more precision, 30 iterations reach 9.31 x 10^-10. Each additional iteration roughly doubles the number of correct digits, so going from 20 to 30 buys a large jump in accuracy.
Bisection or Newton's method - which is better?
Bisection is slower but cannot diverge and carries a guaranteed bound on the error. Newton is faster once close to the root. A practical approach is to start with bisection to get near the root, then finish with Newton for speed and extra precision.
Can bisection find every root?
No. It finds only roots with a sign change. A root that just touches the axis, like a double root, shows no sign change and is missed entirely. Before running bisection, check where the function actually changes sign so you bracket the right root.