Unclemick,
You're basically right about duration, and here's how it works more specifically (but without rigorous mathematical proof).
To calculate the duration of a bond, all of the future payments (both interest payments and payment of principal at maturity) are converted to present worth values. The duration is the average length of time to the payments, weighted by the present value of each payment.
The duration is always less than the time to maturity, except in the case of a "zero coupon" bond, which makes no interest payments. This type of bond makes only one payment -- at maturity -- and so its duration is equal to its time to maturity.
The practical value of the "duration" parameter is that it provides an easy indication of the sensitivity of a bond's market price to changes in interest rates. The market value will change (in the opposite direction of interest rates) by a percentage that is given by the change in the interest rate multiplied by the duration of the bond. For example, if the interest rate on bonds with a duration of 10 years increases by 1 percentage point, the current market value will drop by 10 percent. I don't think that this is mathematically precise, but it's close enough to be of practical value in understanding your exposure to the risk of changes in the market value of bonds as interest rates change.
By the way, the duration of a portfolio of bonds is just the average of the durations of the bonds in it, weighted by their market value.
An editorial comment:
Consistent with the economic principle that "there's no such thing as a free lunch," the increased risk of short-term loss of market value that comes with bonds of longer duration, is the "price" that investors pay for receiving higher long-term rates of return. The people complaining about the low returns on short-term bonds (those with very short durations) are like people in hell complaining that they don't get icewater.