A loaf is a shape, usually rounded or oblong, mass of food. It may refer to a whole article of bread. Technically, any unit of bread is called a "loaf", no matter what its shape, and the loaf can therefore vary in the ratio of length to width, and in its roundness. However, it is common to bake bread in a rectangular bread pan, also called a loaf pan, because different kinds of bread dough have different levels of viscosity, meaning that some doughs will tend to collapse and spread out more than others during the cooking process. Doughs with a thicker viscosity can be hand-molded into the desired loaf shape, and cooked without using any kind of walled pan. The shape of doughs with a thinner viscosity can be maintained with a bread pan whose sides are higher than the uncooked dough.
The same principle applies to non-bread products such as meatloaf and cakes that are cooked so as to retain their shape during the cooking process. In determining the size of the loaf, the cook or baker must take into consideration the need for heat to penetrate the loaf evenly during the cooking process, so that no parts are overcooked or undercooked. Many kinds of mass-produced bread are distinctly squared, with well-defined corners on the bottom of the loaf. Loaves of rectangular shape can be made more or less identical, and can be packed and shipped efficiently.