Well there hasn’t been an impact large enough in the last over three billion years to do that, so it’s not something we need to worry about at present. We seem to be protected by Jupiter, from the very largest asteroids, though not from small ones of order ten kilometers or so and smaller.
However, if you look at the cratering record then there were some really large impacts on the Moon, Earth, Mars and its Moons, Mercury over three billion years ago. Impactors of the order of 100 kilometers across or larger. For instance the lunar south pole Aitken crater was probably created by an impactor about 100 kilometers across. These date back to towards the end of the late heavy bombardment, when the solar system was still settling down into its current state.
An asteroid 100 kilometers across would be seriously bad news for Earth. Still, microbes would be likely to survive deep below the surface if nothing else, and others sent off into space in the debris. So I’m not sure that even that would end all life on Earth. Even the impact that created the Moon could have sent hardy microbial spores into space only to return to Earth when it cooled down millions of years later.
So, I’m not sure we can give a size that would do this. Maybe even an Earth sized planet hitting Earth wouldn’t end all life here.
If you mean just making humans extinct, well I think it would have to be quite a bit larger than the dinosaurs Chicxulub impact. Because many lifeforms survived that including birds, mammals, turtles, crocodiles, the dawn redwood tree etc. Humans are so adaptable I’m sure we’d survive also. Even with stoneage technology we can survive anywhere from the Arctic through to the Kalahari desert, tropical rainforest, high mountain plateaus, just about anywhere. And as omnivores we can survive (if not very healthy on some diets) again almost anywhere. We can eat shellfish, or fish, many kinds of plants and fruit, animals. After the Chicxulub disaster there would be plenty for humans to eat with minimal stone age technology.
So - I know some say humans would go extinct after a 10 kilometer asteroid impact. I don’t see that. I don’t think that could make us extinct. It would have to be much larger, large enough so there are no habitats for humans on Earth and nothing for us to eat for long enough for us all to starve or die. It would be large enough if it boiled the oceans and melted the continents.
Those are impacts we don’t need to worry about, because they are so improbable that you might as well call them impossible. Because Jupiter protects us from these very large asteroids.
In principle a stone lying on a path could jump ten meters into the air or higher, if all the atoms in the stone happened to be moving in the same direction at the same time. But that’s so improbable that there’s no point planning for it or even giving it any serious thought. So sometimes things are possible in theory but so very improbable you might as well just ignore them.
I’m not sure what the probability is of a 100 kilometer impactor. It can’t be right to just draw a straight line and say that we must get a 1000 kilometer asteroid every billion years as in this diagram.
Meteorites, Impacts, & Mass Extinction
That’s quite good for the smaller asteroids, but when it gets up to 100 kilometers, or 1000 kilometers, it just can’t be right at all, or we’d have many huge crater scars. Mars, Mercury, the moons of Mars and our Moon and Earth would have between them at least quite a few recent impacts of 1000 kilometers in diameter asteroids more recently than over three billion years ago. Especially as Mars is closer to the asteroid belt and gets more impacts than us.
Instead none of them even have an impact crater from a 100 kilometer asteroid since well over 3 billion years ago. With that evidence, of no large impact scars for so long on any of them, you might as well just say it is impossible - for all practical purposes anyway.
BTW a 10 kilometer asteroid is also very improbable. It’s 99.9999% certain we won’t be hit one in any given century. Last one was 66 million years ago and they happen roughly every 100 million years. But that doesn’t mean there is one due to hit us soon or that it is any more probable than it was the year after the Chicxulub impact. Probability doesn’t work like that unless there is some correlation.
And actually this century we have already plotted the orbits of all the near Earth asteroids of around 10 km or larger and none are headed our way this century. So that makes it even more unlikely. Would have to be a comet or an asteroid in a comet-like orbit that takes it way beyond Jupiter, and those are rare compared to ordinary asteroids in the inner solar system.
See also my Giant Asteroid Headed Your Way? - How We Can Detect And Deflect Them
And you can try out this online Impact: Earth! calculator which figures out the effect of impactors of various diameters. It also gives you an idea of how often they happen.