Accrued interest
From Academic Kids

In finance, accrued interest is the interest that has accumulated since the principal investment. For a financial instrument such as a bond, interest is calculated and paid in set intervals.
Formula
The primary formula for calculating the interest accrued in a given period is:
<math> I_A = T \times P \times R <math>
where <math>I_A<math> is the accrued interest, <math>T<math> is the fraction of the year, <math>P<math> is the principal, and <math>R<math> is the annualized interest rate.
<math>T<math> is calculated as follows:
<math> T = \frac{D_P}{D_Y} <math>
where <math>D_P<math> is the number of days in the period, and <math>D_Y<math> is the number of days in the year.
A compounding instrument adds the previously accrued interest to the principal each period.
The main variables that affect the calculation are the period between interest payments and the day count convention used to determine the fraction of year, and the date rolling convention in use.
Day count conventions
Common day count conventions that affect the accrued interest calculation are:
 30/360 (days per month, days per year)  each month is treated as having 30 days, so a period from February 1, 2005 to April 1, 2005 is considered to be 60 days. The year is considered to have 360 days. This convention is frequently chosen for ease of calcuation: the payments tend to be regular and at predictable amounts.
 actual/365  each month is treated normally, and the year is assumed to have 365 days, regardless of leap year status. For example, a period from February 1, 2005 to April 1, 2005 is considered to be 59 days.
This convention results in periods having slightly different lengths.
 actual/actual (ACT/ACT)  each month is treated normally, and the year has the usual number of days. For example, a period from February 1, 2005 to April 1, 2005 is considered to be 59 days. In this convention leap years do affect the final result.
Date rolling
Date rolling comes into effect because many instruments can only pay out accrued interest on business days. This often results in interest accruing for a slightly shorter or longer period. Common date rolling conventions are:
 Following business day. The payment date is rolled to the next business day.
 Modified following business day. The payment date is rolled to the next business day, unless doing so would cause the payment to be in the next calendar month, in which case the payment date is rolled to the previous business day. Many institutions have monthend accounting procedures that necessitate this.
 Previous business day. The payment date is rolled to the previous business day.
 Modified previous business day. The payment date is rolled to the previous business day, unless doing so would cause the payment to be in the previous calendar month, in which case the payment date is rolled to the next business day. Many institutions have monthend accounting procedures that necessitate this.