Calculate compound interest