Around 8 years ago, a friend of mine was surprised by the presence of 3 robbers inside his house's outer perimeter at around 8 pm or so. All he had was a .22 short 8 shot revolver. He fired on them from window and emptied it, reloaded once by going inside the washroom but did not have to fir again as the robbers fled like hell while returning fire aimlessly. No 1 got hit.
Called his friend in LE and the police arrived in 10 mins or so. Of course they were long gone but it turned out that there were actually 7 robbers who fled from the scene.
The thing is if they were determined enough to get him, he would have been toasted as he did not have the capacity nor the caliber but in most home invasions the result may be the same as this one if the owner reacts on time.