def real_return(nominal_return, inflation_rate):
    """Calculate an inflation-adjusted return.

    Parameters
    ----------
    nominal_return : float
        Nominal return.
    inflation_rate : float
        Inflation rate.

    Returns
    -------
    float
        Real (inflation-adjusted) return.
    """
    return (1 + nominal_return) / (1 + inflation_rate) - 1