Increased length of stay (LOS) in intensive care units is directly associated with the financial burden, anxiety, and increased mortality risks. In the current study, we have incorporated the association of day-to-day nutrition and medication data of the patient during its stay in hospital with its predicted LOS. To demonstrate the same, we developed a model to predict the LOS using risk factors (a) perinatal and antenatal details, (b) deviation of nutrition and medication dosage from guidelines, and (c) clinical diagnoses encountered during NICU stay. Data of 836 patient records (12 months) from two NICU sites were used and validated on 211 patient records (4 months). A bedside user interface integrated with EMR has been designed to display the model performance results on the validation dataset. The study shows that each gestation age group of patients has unique and independent risk factors associated with the LOS. The gestation is a significant risk factor for neonates < 34 weeks, nutrition deviation for < 32 weeks, and clinical diagnosis (sepsis) for ≥ 32 weeks. Patients on medications had considerable extra LOS for ≥ 32 weeks’ gestation. The presented LOS model is tailored for each patient, and deviations from the recommended nutrition and medication guidelines were significantly associated with the predicted LOS.