def temp_gradient(bottom_hole_temperature, surface_temperature, bottom_hole_depth):
    """
    Temperature gradient calculation.

    Parameters
    ----------
    bottom_hole_temperature : float
        Bottom hole temperature (deg F or deg C)
    surface_temperature : float
        Surface temperature (deg F or deg C)
    bottom_hole_depth : float
        Bottom hole depth (ft or m)

    Returns
    -------
    float
        Returns temperature gradient in deg per depth unit (degF/ft or deg C/m)
    """
    gradient = (bottom_hole_temperature - surface_temperature) / bottom_hole_depth
    return gradient