These days, pretty much never. I used to format XP every six months or so, because it had slowed down a lot by that point. But it's just not necessary with newer versions of Windows. I've had 7 installed more or less since launch, and feel no need to format it.