BMI is calculated by dividing a person's weight (in kilograms) by their height (in meters squared). The formula is as follows:
BMI = weight (kg) / height^2 (m^2)
This equation measures the ratio of weight to height and provides an estimation of body fatness. The resulting value indicates whether an individual is underweight, normal weight, overweight, or obese.