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:
- Find the midpoint c = (a + b)/2 and evaluate f(c).
- Keep the half where the sign still changes: [a, c] if f(a) and f(c) differ in sign, otherwise [c, b].
- Repeat until the interval is short enough. The midpoint of the last interval is the answer.
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
- Python Numerical Methods, §19.3 Bisection Method — UC Berkeley
- NIST Digital Library of Mathematical Functions, §3.8 Nonlinear Equations (bisection method) — NIST
- Calculus Volume 1, §2.4 Continuity (Intermediate Value Theorem) — OpenStax
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