def debtservice(financedamount, interestrate, years):
    """Return annual debt service cost.

    :param financedamount: Amount of money borrowed.
    :type financedamount: double
    :param interestrate: Percent interest charged to borrow money.
    :type interestrate: double
    :param years: length of financing term in years.
    :type years: double
    :return: double

    """
    i = interestrate / 12
    n = years * 12
    return financedamount * i * pow(1 + i, n) / (pow(1 + i, n) - 1) * 12