In hospitals, mean length of stay (LOS) is calculated by dividing the sum of inpatient days by the number of patients within the DRG category. Inpatient days are calculated by subtracting day of admission from day of discharge, so persons entering and leaving a hospital on the same day have a length of stay of zero.