Bond Duration   
Let:
B = maturity value of the bond
c = coupon rate (per period)
y = yield rate (per period)
n = periods to maturity (... could be months, years, etc.)

Then:
DURATION = weighted average of the times when all the interest AND the value-at-maturity value are received.

That means, a weighted average of the numbers 1, 2, 3, ...., n (these, after all, are the times we are averaging.) After these many periods all the n payments of $cB AND the maturity value of $B have been received.

Aah, but the weights are the present value of these payments, namely:
cB/(1+y), cB/(1+y)2, cB/(1+y)3, ..., cB/(1+y)n
(them's the coupons) and, finally, B/(1+y)n (the present value of the maturity value of the bond)


A Definition:
If we have weights called w1, w2, w3, ... , wN
then the weighted average of the numbers 1, 2, 3, ..., N is (by definition) Numerator/Denominator where:
Numerator = [1 w1 + 2 w2 + 3w3 + ... + N wN]
and Denominator = [w1 + w2 + w3 + ... + wN]

We start with the Denominator ('cause it's easier):
Denominator = cB/(1+y)+cB/(1+y)2+cB/(1+y)3+ ... +cB/(1+y)n+B/(1+y)n
which is so obscene that we let x = 1/(1+y) and get:
Denominator = cB x {1 + x + x2 + x3 + ... + xn-1 } + B xn

The sum is a geometric series so we use the magic formula:
1 + x + x2 + x3 + ... + xn-1 = (xn - 1)/(x - 1) and get:

Denominator = cB {x (xn-1)/(x-1)} + B xn.

Now, on to the Numerator where, again for simplicity, we let x = 1/(1+y):
Numerator = cB x {1 + 2x+ 3x2+... + nxn-1} + B n xn

Surprise! This sum is the derivative of an earlier sum!
(Uh ... that's Calculus ya know.)

so 1 + 2x+ 3x2+...+ nxn-1
= d/dx {x + x2 + x3 + ... +xn }
= d/dx {x (xn - 1)/(x - 1)}
= d/dx { xn - 1 + (xn - 1)/(x - 1) }
= nxn-1 + nxn-1/(x - 1)- (xn-1)/(x-1)2
= n xn/(x-1) - (xn-1)/(x-1)2

and DURATION = Numerator/Denominator becomes
(after cancelling the B's)
{cn xn+1/(x-1) - c x (xn-1)/(x-1)2 + n xn}/ {c x (xn-1)/(x-1) + xn}

Now replace x by 1/(1+y) and simplify!?$#&*:
DURATION = (1+y)/y - {1+y + n(c-y)}/ {c[(1+y)n - 1] + y}

!?$#&*: You didn't expect me to simplify, right? But I can tell you that x/(x-1) = -1/y.

See also Bonds 'n Stuff