# Calculate Compound interest

**URL:** <https://www.ruby-forum.com/t/calculate-compound-interest/160849>\
**Category:** Rails\
**Created:** [February 20, 2009, 9:17am UTC](https://www.ruby-forum.com/t/calculate-compound-interest/160849 "2009-02-20T09:17:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitparekh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Post date:** [February 20, 2009, 9:17am UTC](https://www.ruby-forum.com/t/calculate-compound-interest/160849/1 "2009-02-20T09:17:40Z")

</div>

Hi

I want to calculate compound interest on monthly and daily basis. I am  
doing this with the formula.

Now the question is wats the syntax for ^ in raise to since i want to do  
something like A= p(1+R)^N

Now ^ symbol for raise to is not working. Let me know what should i do  
instead of that?

Thanks

---

<div class="post-metadata">

**Author:** ![ankitparekh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Post date:** [February 20, 2009, 9:25am UTC](https://www.ruby-forum.com/t/calculate-compound-interest/160849/2 "2009-02-20T09:25:45Z")

</div>

pow(x,y) can be represented as x\*\*y

–  
Shiv N Gautam

On Fri, Feb 20, 2009 at 1:47 PM, Ankit P. \<  
removed\_email\_address@domain.invalid\> wrote:

> instead of that?
> 
> ## Thanks
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–

Bill Watterson - “There is not enough time to do all the nothing we  
want to  
do.”
