def iqr(data):
    """ Calculate the Interquartile Range from the data.

    :param data: The data to analyze.
     :type data: list(number)

    :return: The calculated IQR.
     :rtype: float
    """
    sorted_data = sorted(data)
    n = len(data) + 1
    q1 = int(round(0.25 * n)) - 1
    q3 = int(round(0.75 * n)) - 1
    return float(sorted_data[q3] - sorted_data[q1])