import math


def get_annual_rate(buy_rate, sale_rate, years):
    """
    Gets the annual rate of return given the buy price, sell price and years held.
    """
    p = sale_rate/buy_rate
    return ( math.pow(p, 1.0/years)-1.0 ) * 100.0