Porosity refers to the pore space within a rock that can be occupied by fluids like water or gas. It is calculated as a percentage by dividing the pore volume by the total bulk volume of the rock. There are different types of porosity depending on when and how the pore space was formed. Porosity can be measured directly using core samples in a lab or indirectly using well logging tools. An example calculation is provided to illustrate determining porosity from measurements of a rock core sample's dimensions and vacuumed pore volume.