Take a quick look at Erpels homework assignment thread, I asked the same question and got a great answer from overflow, it writes out the formula in great clarity.