Hyperglycemia occurs in 22% to 46% of hospitalized patients, negatively affecting patient outcomes, including mortality, inpatient complications, length of stay, and hospital costs. Achieving inpatient glycemic control is challenging due to inconsistent caloric intake, changes from home medications, a catabolic state in the setting of acute illness, consequences of acute inflammation, intercurrent infection, and limitations in labor-intensive glucose monitoring and insulin administration. We conducted a retrospective cross-sectional analysis at the University of California San Francisco hospitals between September 3, 2020 and September 2, 2021, comparing point-of-care glucose measurements in patients on nil per os (NPO), continuous total parenteral nutrition, or continuous tube feeding assigned to our novel automated self-adjusting subcutaneous insulin algorithm (SQIA) or conventional, physician-driven insulin dosing. We also evaluated physician efficiency by tracking the number of insulin orders placed or modified. The proportion of glucose in range (70-180 mg/dL) was higher in the SQIA group than in the conventional group (71.0% vs 69.0%, P = .153). The SQIA led to a lower proportion of severe hyperglycemia (>250 mg/dL; 5.8% vs 7.2%, P = .017), hypoglycemia (54-69 mg/dL; 0.8% vs 1.2%, P = .029), and severe hypoglycemia (<54 mg/dL; 0.3% vs 0.5%, P = .076) events. The number of orders a physician had to place while a patient was on the SQIA was reduced by a factor of more than 12, when compared with while a patient was on conventional insulin dosing. The SQIA reduced severe hyperglycemia, hypoglycemia, and severe hypoglycemia compared with conventional insulin dosing. It also improved physician efficiency by reducing the number of order modifications a physician had to place.