I've been messing around with vanitygen lately, and I can't help but wonder: How does it know where "100%" is? If it's trying random addresses, how does it know that after a certain number, there's a 100% chance that it will find the address you want?

It doesn't of course. Haven't used vanitygen in a while, and think it gives out a probability of 50% to start with? if it guesses at a rate of X/second and the probability of success of each guess is Y, the chance of success in the next second is 1-(1-Y)**X.

example:

I'm thinking of a number between 1 and 10,000. You have 10,000 guesses per minute. (blah blah, assume i get to choose new number after each guess)

The chance you hit in the next minute is 1-(1-0.0001)^10000 = 63.21%. If you want the 50% mark, solve as ln(.5)/ln(.9999) = 6931.125 guesses. Since you guess at 10,000 per minute, the 50% mark is in 6931.125/10,000 minutes or 41.59 seconds

And that is what vanitygen puts out, 50% chance in the next 41.6 seconds. If it still acts the same way, once 41.59 seconds goes by, it says 75% chance in the next 41.59 seconds, but it really means 75% chance in 83.17 seconds from when you started.