Among the most notorious shipwrecks in history is the Titanic. Out of the 2,224 passengers and crew, 1,502 perished when the Titanic sank on April 15, 1912, during her maiden voyage, following an iceberg collision. Ship safety laws have improved as a result of this dramatic disaster that stunned the world. Scientists and investigators are beginning to understand what could have caused some passengers to survive while others perished in the Titanic catastrophe. A contributing factor in the high death toll from the shipwreck was the insufficient number of lifeboats available for both passengers and the crew. An intriguing finding from the sinking is that certain individuals, such as women and children, had a higher chance of surviving than others. Since the accident, new regulations were drafted mandating that the number of lifeboats match the number of passenger seats. Numerous machine learning techniques were used to forecast the passengers' survival rate. Preprocessing and data cleaning are essential measures to reduce bias. In this paper, decision trees and random forests, two machine learning techniques, are used to determine the probability of passenger survival. The primary goal of this work is to distinguish between the two distinct machine learning algorithms to analyze traveler survival rates based on accuracy. Machine learning technologies are utilized to forecast which passengers would survive the accident. The highest accuracy achieved is 81.10% for Gradient Boost Trees.