Smart Formulation is a machine learning based platform designed to predict the Beyond Use Dates (BUDs) of compounded oral solid dosage forms by integrating molecular, formulation, and environmental parameters. Using a curated dataset of 3,166 active pharmaceutical ingredients (APIs), the model combines molecular descriptors with experimental stability data from Stabilis to train a tree 35 ensemble regression algorithm. This approach enables accurate prediction of API degradation under varying storage conditions, offering a scalable and cost-effective alternative to traditional stability testing. The analysis reveals a significant influence of formulation variables including the nature and number of excipients, and storage temperature on predicted stability. A negative correlation between LogP and BUD was identified, suggesting that hydrophilic APIs generally exhibit greater stability, especially when 40 formulated with a single excipient. Certain excipients such as cellulose, silica, sucrose, and mannitol were associated with enhanced stability. In contrast, excipients like HPMC and lactose, which have higher hydrogen bond donor and acceptor counts, were linked to faster degradation. The combination of two excipients instead of one often resulted in decreased stability, potentially due to moisture redistribution or phase separation effects. 45 Smart Formulation contributes to the field of computational pharmaceutics by bridging theoretical design and practical compounding. Its implementation in hospital and community pharmacies could mitigate drug shortages, streamline workflows, and support high-quality patient care. Future development will explore real-time stability monitoring and adaptive machine learning to further enhance predictive capabilities.