During mitosis, adherent animal cells undergo a drastic shape change, from essentially flat to round. Mitotic cell rounding is thought to facilitate organization within the mitotic cell and be necessary for the geometric requirements of division. However, the forces that drive this shape change remain poorly understood in the presence of external impediments, such as a tissue environment. Here we use cantilevers to track cell rounding force and volume. We show that cells have an outward rounding force, which increases as cells enter mitosis. We find that this mitotic rounding force depends both on the actomyosin cytoskeleton and the cells' ability to regulate osmolarity. The rounding force itself is generated by an osmotic pressure. However, the actomyosin cortex is required to maintain this rounding force against external impediments. Instantaneous disruption of the actomyosin cortex leads to volume increase, and stimulation of actomyosin contraction leads to volume decrease. These results show that in cells, osmotic pressure is balanced by inwardly directed actomyosin cortex contraction. Thus, by locally modulating actomyosin-cortex-dependent surface tension and globally regulating osmotic pressure, cells can control their volume, shape and mechanical properties.