<p>Every year thousands of people are dying due to road accidents and most of the accidents are occurring in urban areas and highways. As the number of vehicles is increasing day by day, the probability of the occurrence of the accident is also increasing. A system has been introduced in this paper that can reduce road accidents by sending an alert to drivers via smartphones. For this purpose, an android-based application has been developed. To reduce the accident, every driver of the car must have the application. Firstly, the location of the vehicle will be collected from the driver’s smartphone, then the data will be sent to the server through the application. An algorithm has been also developed using Haversine Formula which calculates the distance among the vehicles. A total of five cases have been implemented according to the dataset and compared for the performance evaluation. An extensive experimental study and comparison have been performed with the other methods where a complete performance is focused that can be claimed to reduce road accidents via the device-to-device communication process.</p>