Okay, well depends on the size. Even the very largest won't make us all extinct
(the dinosaurs didn't have our technology or telescopes, and many creatures such as birds, mammals, turtles etc survived the dinosaur impact - we'd be able to protect many also with our technology with fire shelters, submarines - or just traveling to another part of the world at the time of the impact, wherever is the safest place, e.g. Alaska, Siberia and Antarctica to avoid firestorms - also, we'd spot something that big long in advance and likely deflect or destroy it).
But a 1 km asteroid would be pretty devastating to a lot of people, that's the size of impact that could devastate a continent. It is expected once every 100,000 to 1 million years. Take the lower end of the range, and interpreting that probability as a 1 in 100,000 probability of impact every year (could be other ways of interpreting it but will lead to similar result).
So then you use the probability that it doesn't happen each year, simplifies the calculation - that's (1-0.00001)^n where n is the number of years. Then subtract that from 1 to get the probability that it happens in at least one of the years, and multiply by 100 to get the percentage.
So, for one decade, very unlikely, gets more and more likely, until over a million year period it is a near certainty.
In a decade, 100*(1-(1-0.00001)^10) = 0.01%, or 1 in 10,000
In 1 century, 100*(1-(1-0.00001)^100) = 0.1% or 1 in 1,000
In 1 millenium, 100*(1-(1-0.00001)^1000) = 1% or 1 in 100
In 10,000 years 100*(1-(1-0.00001)^10,000) = 9.5%
In 100,000 years 100*(1-(1-0.00001)^100,000) = 63.2%
In a million years, 100*(1-(1-0.00001)^1,000,000) = 99.995%
You can use the same method for any of the other asteroid sizes in this impact risk table. Impact event
There's a good comparison here with other risks, where the author David Spiegelhalter (Winton Professor for the Public Understanding of Risk in the Statistical Laboratory, University of Cambridge), figures out that your risk of being killed by any kind of asteroid in your lifetime is roughly the same as the risk you'd face if you did a 3 mile car journey every year.
It's important though because though the individual risks are low the number of people impacted if it does happen is high. Also, it's a preventable risk unlike earthquakes, volcanoes etc.
Over those timescales hopefully we've mapped out just about the possible asteroids, so we've spotted it several thousand years or at least decades before it hits, it does several close flybys first, then it is relatively easy to deflect.
The main danger is from ones that we haven't spotted yet. So given the limited funding available, obviously our priority has to be to detect the asteroids right now. Once detected we can then figure out how to deflect them. Which may not be that hard as almost certainly the first ones we detect will be smaller ones, perhaps 100 meters or so in diameter, discovered decades before they hit, and that will give us the practice we need for the larger ones later on.