If you ever clean out the gutters on your roof, take note: The dirt you’re tossing may have come from outer space.

The new book “Cosmic Impact: Understanding the Threat to Earth from Asteroids and Comets,” by Andrew May (Icon Books), gives an overview of the potential dangers we may one day face from near-Earth objects (NEOs), noting that on a smaller scale, items falling to Earth from space is a daily occurrence.

“In an average day, about 100 tons of meteor dust falls on the planet,” May writes. “One of the best places to find it is on non-porous surfaces like city rooftops and gutters . . . The sludge in your gutter almost certainly contains a few particles that came from outer space.”

Dust particles from space, though, don’t place the planet and its inhabitants in mortal danger. Asteroids like the one that rendered the dinosaurs extinct are the worrying ones.

The 124-mile Chicxulub crater, near Mexico’s Yucatan Peninsula, was forged 66 million years ago when an object around 69 miles across slammed into the area from space. The resulting fire and dust — the latter of which blanketed the Earth’s atmosphere, virtually blocking out the sun — eventually killed off the dinosaurs.

Were we to be hit with a similar object today, the result would be similar.

“The devastation would be so much larger than anything in human experience that it’s difficult to imagine,” May writes. “If the impact occurred in the sea, the water would boil. If it was on land, vast areas would be ravaged by firestorms. The dust thrown up by a Chicxulub-sized impact would prevent sunlight reaching Earth’s surface for months — maybe even years — to come.”

The good news, though, is that the odds of such an object hitting Earth in our lifetimes is close to zero.

The Torino Scale considers the size of NEOs and the chances of them hitting Earth over the next hundred years to place the possible danger on a scale from 1 to 10.

At present, the upcoming century looks danger-free.

“There’s currently no known object with a Torino rating even as high as 1,” May writes. “Everything we know about is either too small to cause any damage, or there’s zero chance it will collide with Earth in the next hundred years.”

This has not always been the case, however. As recently as 2004, an object was spotted that had a worrying Torino number of 4, signifying a decent chance of contact that would cause untold destruction.

When scientists spotted a 350-meter asteroid that year, they calculated a greater than 1 percent chance it would collide with Earth in 2029. Given its size, that would have led to an explosion well into the “thousand-megaton class.” (By comparison, May writes that the nuclear bombs exploded over Hiroshima and Nagasaki were around 0.02 megatons each.)

Luckily, subsequent calculations “refined the orbit and ruled out a collision,” May writes.

But while the risk of a planet-shattering asteroid is currently nil, outer space swirls with smaller objects that, while not threatening to humanity, can still do real damage.

In fact, they already have.

June 30, 1908, saw the “biggest cosmic impact in recorded history” when a “small rocky asteroid or possibly a tiny comet,” later estimated to be between 30 meters to 70 meters, exploded over the “sparsely populated Tunguska River valley in Siberia.”

The location was fortunate, as the explosion, a thousand times more powerful than the bombs used in Hiroshima and Nagasaki, killed no one.

“When the Tunguska object entered Earth’s atmosphere, [there] was an explosion on the order of 10-15 megatons — typical of a Cold War nuclear weapon,” May writes. “Its most obvious effect was to scorch and flatten trees — 80 million of them — out to a radius of 30 kilometers around Tunguska’s ‘ground zero.’ ”

May quotes a scientist named Gerrit Verschuur, who wrote that “estimates of the casualties that would result from a Tunguska-like event in a populated area . . . suggest as many as 5 million dead.”

That said, the possible effects of impact from a smaller, non-planet-destroying NEO are not all negative, as comets can provide vital resources to our planet, and may have already done so.

May again quotes Verschuur, who wrote in 1996, “A dozen or so massive comets carry enough water and organic molecules to provide all the Earth’s water and biomass.” This can also apply to some asteroids and meteorites.

May writes, in fact, that a “significant fraction” of the Earth’s water and organic organisms got here exactly that way.

He notes that a meteorite that landed in Australia in 1969 was found to have “at least 15 different types of amino acid, as well as a significant amount of water — about 10 percent by weight.”

“Impacts . . . were much more numerous in the early history of the Earth,” he writes. “So it’s not unreasonable to imagine that they brought much of the raw material needed for the formation and development of life.”

Given that an NEO’s collision with Earth would more likely destroy life than create it, though, the United States monitors the atmosphere, preparing for possible intervention.

NASA constantly views the skies using large telescopes from points in Arizona and Hawaii. But even this defense has risks.

In February 2013, astronomers identified an asteroid they christened 367943 Duende, which would pass close to the Earth, but not make contact.

Some skeptics thought the asteroid would hit us despite the scientists’ assurance, which is not unusual. When “a huge meteor exploded in the skies over Chelyabinsk [Russia] that day,” the skeptics felt vindicated.

But the scientists hadn’t been wrong about Duende. The meteor that exploded, it turned out, was an entirely different one that they failed to notice because it “came from the direction of the sun,” which meant it “was only above the horizon in daylight, when telescopes couldn’t see it.”

“This blind spot around the sun is a constant irritation to NEO hunters,” May writes. “They just have to hope anything hiding there comes out before it hits us.”

While there’s no way to defend against an object we never see coming, if an NEO should be spotted on a direct path to Earth, there are options for Earth’s defense. Here again, they’re all risky.

An asteroid can be destroyed by detonating a nuclear weapon on it, but the many resulting fragments would continue along the same orbit, making the blowback as potentially damaging as the avoided hit.

For that reason, scientists would be far more likely to try to deflect the object to throw it off its orbit altogether.

The NEO would need to be directly pushed out of its orbit or have its speed altered. Neither the direction nor the eventual speed would matter. Anything that significantly changed the object’s course would prevent it from making contact.

The key word there, however, is “significantly.”

“An NEO large enough for us to worry about will be much more massive than anything we’re used to pushing around,” May writes.

“A 1-kilometer rock amounts to more than a billion tons — or something like 10,000 aircraft carriers. How are we going to push that into a new orbit, even if it’s only by a small amount?”

One answer brings us back to the nuclear option.

Hydrogen-bomb pioneer Edward Teller proposed, in this scenario, landing a nuclear explosive on the object itself, as the force of the detonation would propel it out of its orbit. Unfortunately, this would require “a spacecraft to match speeds with the asteroid and land on it.”

That would take years, and leave the project open to all manner of complications.

Others have suggested that exploding the device near the object, rather than on it, could have the same effect. But given the risk — and that sending a nuclear device into space would break several international treaties — use of this method is unlikely.

But throwing the object off its orbit wouldn’t require a nuclear device if we could engineer a spacecraft or other propellant to smash directly into it.

When NASA sent a probe onto a passing comet in 2005, it was to inspect it, not divert it. But the speed it achieved did just that, changing the comet’s orbit by 0.00005 millimeters per second, and lending credibility to the tactic, if needed.

Luckily for us, this is most likely academic, as mentioned before, as the chance of an NEO large enough to do significant damage to the Earth in our lifetime is practically zero.

Unless, of course, we lose it in the sun.