We present a systematic and quantitative model of huddling penguins. In this mathematical model, each individual penguin in the huddle seeks only to reduce its own heat loss. Consequently, penguins on the boundary of the huddle that are most exposed to the wind move downwind to more sheltered locations along the boundary. In contrast, penguins in the interior of the huddle neither have the space to move nor experience a significant heat loss, and they therefore remain stationary. Through these individual movements, the entire huddle experiences a robust cumulative effect that we identify, describe, and quantify. This mathematical model requires a calculation of the wind flowing around the huddle and of the resulting temperature distribution. Both of these must be recomputed each time an individual penguin moves since the huddle shape changes. Using our simulation results, we find that the key parameters affecting the huddle dynamics are the number of penguins in the huddle, the wind strength, and the amount of uncertainty in the movement of the penguins. Moreover, we find that the lone assumption of individual penguins minimizing their own heat loss results in all penguins having approximately equal access to the warmth of the huddle.