To calculate BMI (body mass index), divide a person's weight in kilograms by their height in meters squared. The formula is: BMI = weight (kg) / height (m)².