Currently, considerable attention is being paid to the problem of asteroid-comet hazard. This is largely due to the development of observational tools that allow the discovery of thousands of near-Earth asteroids annually. One of the most important tasks is to predict possible impacts with the Earth. In addition, a number of spacecrafts are operating on the Moon (Yutu-2) and Mars (Curiosity). In the future, there will probably be people. Based on the Gauss – Everhart method, a high-performance program has been created for calculating the trajectories of a large number of virtual asteroids. High performance made it possible to use the Monte Carlo method to calculate the impact probabilities. Using the new program, the following results are obtained. The probabilities of approaches and impacts of 200 asteroids with all planets of the Solar system and the Moon are estimated. The region in the space of orbital elements is determined, from where close approaches and impacts with the Earth are most likely. It is confirmed that there is likely to be a close approach on the impact trajectory for 100 years before the impact. The impact probabilities are estimated for all asteroids in the Solar System, with the exception of main belt asteroids that do not approach any planet.