Paritian

Mathematics

Bisection Method Calculator

A root found by repeatedly halving an interval, with every step shown and a check that the interval brackets one.

Results

The root 1.414213562370
Does the sign change inside? Yes
Every step of the way 0 0 2 1 -1 1 1 2 1.5000000000 0.2500000000 2 1 1.5000000000 1.2500000000 -0.4375000000 3 1.2500000000 1.5000000000 1.3750000000 -0.1093750000 4 1.3750000000 1.5000000000 1.4375000000 0.0664062500 5 1.3750000000 1.4375000000 1.4062500000 -0.0224609375 6 1.4062500000 1.4375000000 1.4218750000 0.0217285156 7 1.4062500000 1.4218750000 1.4140625000 -0.0004272461 8 1.4140625000 1.4218750000 1.4179687500 0.0106353760 9 1.4140625000 1.4179687500 1.4160156250 0.0051002502 10 1.4140625000 1.4160156250 1.4150390625 0.0023355484 11 1.4140625000 1.4150390625 1.4145507813 0.0009539127 12 1.4140625000 1.4145507813 1.4143066406 0.0002632737 13 1.4140625000 1.4143066406 1.4141845703 -0.0000820011 14 1.4141845703 1.4143066406 1.4142456055 0.0000906326 15 1.4141845703 1.4142456055 1.4142150879 0.0000043148 16 1.4141845703 1.4142150879 1.4141998291 -0.0000388434 17 1.4141998291 1.4142150879 1.4142074585 -0.0000172643 18 1.4142074585 1.4142150879 1.4142112732 -0.0000064748 19 1.4142112732 1.4142150879 1.4142131805 -0.0000010800 20 1.4142131805 1.4142150879 1.4142141342 0.0000016174 21 1.4142131805 1.4142141342 1.4142136574 0.0000002687 22 1.4142131805 1.4142136574 1.4142134190 -0.0000004056 23 1.4142134190 1.4142136574 1.4142135382 -0.0000000685 24 1.4142135382 1.4142136574 1.4142135978 0.0000001001 25 1.4142135382 1.4142135978 1.4142135680 0.0000000158 26 1.4142135382 1.4142135680 1.4142135531 -0.0000000263 27 1.4142135531 1.4142135680 1.4142135605 -0.0000000052 28 1.4142135605 1.4142135680 1.4142135643 0.0000000053 29 1.4142135605 1.4142135643 1.4142135624 0 30 1.4142135605 1.4142135624 1.4142135615 -0.0000000026 31 1.4142135615 1.4142135624 1.4142135619 -0.0000000013 32 1.4142135619 1.4142135624 1.4142135622 0 33 1.4142135622 1.4142135624 1.4142135623 0 34 1.4142135623 1.4142135624 1.4142135623 0 35 1.4142135623 1.4142135624 1.4142135624 0 36 1.4142135624 1.4142135624 1.4142135624 0 37 1.4142135624 1.4142135624 1.4142135624 0 38 1.4142135624 1.4142135624 1.4142135624 0 39 1.4142135624 1.4142135624 1.4142135624 0
What the function gives at that root -4.46954e-12
Steps it actually took 40
Width of interval still left 1.81899e-12
How the page read it x^2 - 2

What this tool does

Bisection is the safest root-finding method there is, and the slowest. If a continuous function is negative at one end of an interval and positive at the other, there has to be a root somewhere in between — so cut the interval in half, keep the half where the sign still changes, and repeat. Each step halves the uncertainty, and it can never diverge or overshoot. This page runs it step by step and shows the shrinking interval; if the function does not change sign across your interval it says so, because then there is nothing to find.

Formula

f(a) × f(b) < 0 · m = (a + b) ÷ 2 · |b − a|ₙ = |b − a|₀ ÷ 2ⁿ

Variables

SymbolMeaningUnit
exprThe function f(x)
lowerInterval from
upperInterval to
stepsAt most this many steps
RTThe root
BRDoes the sign change inside?
TBEvery step of the way
RSWhat the function gives at that root
SUSteps it actually took
WDWidth of interval still left
INHow the page read it

Worked example

  • The function f(x)x^2 - 2
  • Interval from0
  • Interval to2
  • At most this many steps40
  • The root1.414213562370
  • Does the sign change inside?Yes
  • Every step of the way 0 0 2 1 -1 1 1 2 1.5000000000 0.2500000000 2 1 1.5000000000 1.2500000000 -0.4375000000 3 1.2500000000 1.5000000000 1.3750000000 -0.1093750000 4 1.3750000000 1.5000000000 1.4375000000 0.0664062500 5 1.3750000000 1.4375000000 1.4062500000 -0.0224609375 6 1.4062500000 1.4375000000 1.4218750000 0.0217285156 7 1.4062500000 1.4218750000 1.4140625000 -0.0004272461 8 1.4140625000 1.4218750000 1.4179687500 0.0106353760 9 1.4140625000 1.4179687500 1.4160156250 0.0051002502 10 1.4140625000 1.4160156250 1.4150390625 0.0023355484 11 1.4140625000 1.4150390625 1.4145507813 0.0009539127 12 1.4140625000 1.4145507813 1.4143066406 0.0002632737 13 1.4140625000 1.4143066406 1.4141845703 -0.0000820011 14 1.4141845703 1.4143066406 1.4142456055 0.0000906326 15 1.4141845703 1.4142456055 1.4142150879 0.0000043148 16 1.4141845703 1.4142150879 1.4141998291 -0.0000388434 17 1.4141998291 1.4142150879 1.4142074585 -0.0000172643 18 1.4142074585 1.4142150879 1.4142112732 -0.0000064748 19 1.4142112732 1.4142150879 1.4142131805 -0.0000010800 20 1.4142131805 1.4142150879 1.4142141342 0.0000016174 21 1.4142131805 1.4142141342 1.4142136574 0.0000002687 22 1.4142131805 1.4142136574 1.4142134190 -0.0000004056 23 1.4142134190 1.4142136574 1.4142135382 -0.0000000685 24 1.4142135382 1.4142136574 1.4142135978 0.0000001001 25 1.4142135382 1.4142135978 1.4142135680 0.0000000158 26 1.4142135382 1.4142135680 1.4142135531 -0.0000000263 27 1.4142135531 1.4142135680 1.4142135605 -0.0000000052 28 1.4142135605 1.4142135680 1.4142135643 0.0000000053 29 1.4142135605 1.4142135643 1.4142135624 0 30 1.4142135605 1.4142135624 1.4142135615 -0.0000000026 31 1.4142135615 1.4142135624 1.4142135619 -0.0000000013 32 1.4142135619 1.4142135624 1.4142135622 0 33 1.4142135622 1.4142135624 1.4142135623 0 34 1.4142135623 1.4142135624 1.4142135623 0 35 1.4142135623 1.4142135624 1.4142135624 0 36 1.4142135624 1.4142135624 1.4142135624 0 37 1.4142135624 1.4142135624 1.4142135624 0 38 1.4142135624 1.4142135624 1.4142135624 0 39 1.4142135624 1.4142135624 1.4142135624 0
  • What the function gives at that root-4.46954e-12
  • Steps it actually took40
  • Width of interval still left1.81899e-12
  • How the page read itx^2 - 2

Limitations

  • The calculation runs entirely in your browser. The values you type are never sent to a server.

Frequently asked questions

Why is it slower than Newton's method?

Because it only ever halves the interval, which buys about one binary digit per step — roughly one decimal digit every three and a bit steps. Newton doubles the correct digits each step when it is behaving. The trade is worth making when reliability matters more than speed: bisection cannot fail if the function changes sign across the interval and is continuous. It needs no derivative, it never overshoots, and it always converges. It is the method you use when you must get an answer rather than a fast answer.

What does "no sign change" mean?

That the function has the same sign at both ends of your interval, so the method has nothing to work with — it cannot know there is a root in there. Either there genuinely is none, or there is an even number of them and they cancel out as far as the sign is concerned. Widen the interval, or narrow it around where you think the crossing is, and look at the graph if you can. The page refuses to return a number in this case rather than returning a meaningless midpoint.