Bisection Method Calculator

Find a root of a polynomial on [a, b] by the bisection method: halve the interval until it is within your tolerance, with a full iteration table.

1, 0, −3, 1 means x³ − 3x + 1. Use 0 for a missing power. Up to degree 20. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.
f(a) and f(b) must have opposite signs.
Stop when the root is pinned down to within this distance.

Results

Root (midpoint of the final interval)
1.532
The true root lies within ±0.00006103515625 of this value.
Root to 12 significant figures
x ≈ 1.53204345703
f at the estimate
-0.00018361
Number of steps (midpoints)
14
Final interval
[1.531982422, 1.532104492]
Iteration table
n | a | b | midpoint c | f(c) | keep 1 | 1 | 2 | 1.5 | −0.125 | [c, b] 2 | 1.5 | 2 | 1.75 | 1.109375 | [a, c] 3 | 1.5 | 1.75 | 1.625 | 0.416015625 | [a, c] 4 | 1.5 | 1.625 | 1.5625 | 0.1271972656 | [a, c] 5 | 1.5 | 1.5625 | 1.53125 | −0.003387451172 | [c, b] 6 | 1.53125 | 1.5625 | 1.546875 | 0.06077194214 | [a, c] 7 | 1.53125 | 1.546875 | 1.5390625 | 0.02841043472 | [a, c] 8 | 1.53125 | 1.5390625 | 1.53515625 | 0.0124412179 | [a, c] 9 | 1.53125 | 1.53515625 | 1.533203125 | 0.004509337246 | [a, c] 10 | 1.53125 | 1.533203125 | 1.532226563 | 0.0005565593019 | [a, c] 11 | 1.53125 | 1.532226563 | 1.531738281 | −0.00141654152 | [c, b] 12 | 1.531738281 | 1.532226563 | 1.531982422 | −0.0004302650486 | [c, b] 13 | 1.531982422 | 1.532226563 | 1.532104492 | 0.00006307863623 | [a, c] 14 | 1.531982422 | 1.532104492 | 1.532043457 | −0.0001836103281 | [c, b]
Function
f(x) = x³ − 3x + 1

How it’s calculated

If a continuous function is negative at one end of an interval and positive at the other, the Intermediate Value Theorem says it must cross zero somewhere in between. The bisection method uses this repeatedly:

c = (a + b)/2 after n steps the midpoint cₙ is within (b − a)/2ⁿ of the root steps needed: n = ⌈log₂((b − a)/tolerance)⌉

It is slower than Newton's method (one binary digit per step) but it cannot fail once you have a sign change.

Example: f(x) = x³ − 3x + 1 on [1, 2]. f(1) = −1 and f(2) = 3. c₁ = 1.5, f(1.5) = −0.125 (negative, keep [1.5, 2]); c₂ = 1.75, f = 1.109375 (keep [1.5, 1.75]); c₃ = 1.625, f ≈ 0.416 (keep [1.5, 1.625]); … With tolerance 0.0001, ⌈log₂(1/0.0001)⌉ = 14 steps are needed, and c₁₄ = 1.53204345703125, guaranteed within 1/2¹⁴ ≈ 0.000061 of the root (the true root is 1.5320889, so the actual error is 0.000045).

Frequently asked questions

Why do f(a) and f(b) need opposite signs?

That sign change is what guarantees a root in between (by the Intermediate Value Theorem). With the same sign there could be no root, or an even number of them, and the method has nothing to go on.

How many steps will it take?

Each step halves the interval, so to be sure of being within a tolerance t you need ⌈log₂((b − a)/t)⌉ steps. From an interval of width 1 to within 0.0001 takes 14 steps.

What if there are several roots in [a, b]?

Bisection finds one of them (whichever its halving narrows in on). Use a narrower interval around the root you want.

Bisection or Newton’s method?

Newton’s method is much faster near a root but can fail. Bisection is slow and steady and always works with a sign change. A common approach is to bisect a few times and then switch to Newton.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator