We can turn the question around. Instead of asking how many guesses a million numbers need, ask how big a range a given number of guesses can handle.
With one guess and nothing else, you can be sure to find one number: yours has to be right. With two guesses you can handle three numbers. Guess the middle one; if it is wrong, the answer “higher” or “lower” leaves exactly one number, which the second guess nails. The feedback is what stretches two guesses to cover three numbers rather than two.
Three guesses handle seven numbers: the middle one, plus a block of three on each side that two further guesses can finish. The pattern is that each new guess uses the old range twice, once on each side of a new middle. So the counts go 1, 3, 7, 15, 31, each one double the last, plus one. These are the powers of two, 2, 4, 8, 16, 32, each less one, because one guess is spent on the middle itself.
Doubling is startlingly fast. Ten guesses reach 1,023 numbers, about a thousand. Ten more doublings multiply that by about a thousand again, so twenty guesses handle 1,048,575 numbers, which is just over a million. Double the range to two million and you need only one more guess, twenty-one. A range of a billion would take just thirty.