Formula for probability of getting consecutive tails in X coin flips

I need to know the chance that I will get consecutive tails (i.e., 2 tails in a row on successive coin flips) at some point in $X$ number of coin tosses. For example, if I toss the coin twice, I know that I have a 25% chance.

What I am really looking for is a formula to solve this question.

• This was asked (and answered) in greater generality at math.stackexchange.com/questions/148353, where "2" was replaced by any $k \ge 1$ and the coin was assumed to have probability $p$ of heads instead of just $1/2$. – whuber Jul 7 '13 at 21:38