Appropriate mud properties enhance drilling efficiency and decision quality to avoid incidents. The detailed mud properties are mainly measured in laboratories and are usually measured twice a day in the field and take a long time. This prevents real-time mud performance optimization and adversely affects proactive actions. As a result, it is critical to evaluate mud properties while drilling to capture mud flow dynamics. Unlike other mud properties, mud density (MD) and Marsh funnel viscosity (MFV) are frequently evaluated every 15−20 min in the field. The goal of this study is to predict the rheological properties of flat rheology synthetic oil-based mud (SOBM) in real time using machine learning (ML) techniques such as random forest (RF) and decision tree (DT). A proposed approach is followed to first predict the viscometer readings at 300 and 600 RPM (R 600 and R 300 ) and then estimate the other mud properties using the existing equations in the literature. A set of data contained MD, MFV, and viscometer readings (R 300 and R 600 ) for different samples from the same mud type. The mud samples were collected after going through a shale shaker. MD and MFV are measured by a mud balance and a Marsh funnel, respectively, while rheology is evaluated using a viscometer. The data were randomly split into training, testing, and validation data sets. The ML models' performance was evaluated through average absolute percentage error (AAPE) and correlation coefficient (R). The proposed models predicted the viscometer readings as a middle stage with a low AAPE that did not exceed 4.5% for both models. The suggested models forecasted the rheological properties with a good degree of accuracy, with an AAPE being less than 7% for most of the parameters. The proposed models can save costs and time since there is no need to include additional tools in the rig location. Furthermore, these models will significantly aid in avoiding serious problems and achieving better rig hydraulics and hole cleaning, which in turn will technically and economically enhance drilling operations.