To calculate the IQR, follow these steps: 1. Arrange the data in ascending order. 2. Find the first quartile (Q1), which is the median of the lower half of the data. 3. Find the third quartile (Q3), which is the median of the upper half of the data. 4. Subtract Q1 from Q3 (IQR = Q3 - Q1).