According to NASA, a recently discovered, "potentially hazardous" asteroid that is almost the size of the tallest skyscraper in the world will pass by Earth shortly before Halloween.

On Nov. 1, the asteroid will be 1.43 million miles from Earth during its closest approach, which is roughly six times the typical distance between Earth and the moon. This is a relatively slim margin by cosmic standards.

The asteroid, known as 2022 RM4, has an estimated diameter of 1,083 to 2,428 feet - barely under the height of Dubai's 2,716-foot-tall Burj Khalifa, the world's tallest building. According to NASA, it will fly by our planet at over 52,500 mph, or roughly 68 times the speed of sound.

About 28,000 asteroids are tracked by NASA, and their positions and orbits are determined using the Asteroid Terrestrial-impact Last Alert System (ATLAS), a system of four telescopes that can survey the whole night sky in a single pass once every 24 hours.

The term "near-Earth object" is used by NASA to designate any space object that comes within 120 million miles of Earth and the term "potentially hazardous" to assign any large body that comes within 4.65 million miles of our planet. Once identified as potential threats, these objects are closely monitored by astronomers who use radar to look for any indication of any deviation from their predicted trajectories that could put them on a devastating collision course with Earth.

NASA has calculated the paths of all near-Earth objects out to the end of the century. According to NASA, the Earth is not in danger of an apocalyptic asteroid collision for at least the next 100 years.

However, astronomers do not believe they should abandon their search. Though the majority of near-Earth objects are unlikely to destroy civilisation, there have been enough deadly asteroid impacts in recent history to warrant continuing attention.

Space agencies from all across the world are already putting their best efforts forward in case astronomers ever spot a hazardous asteroid heading in our direction. In the first test of the planetary defense system for Earth, the Double Asteroid Redirection Test (DART) spacecraft rammed the non-hazardous asteroid Dimorphos off course on September 26 in order to redirect it, changing its orbit by 32 minutes.

Additionally, China has indicated that it is in the first stages of designing an asteroid-redirect mission. The government intends to redirect the space rock from a possibly disastrous collision with our planet by launching 23 Long March 5 rockets at the asteroid Bennu, which is scheduled to swing within 4.6 million miles of Earth's orbit between the years 2175 and 2199.