# Any decent examples or collections of methods for financial functions in XoJo?

**URL:** <https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725>\
**Category:** General\
**Created:** [December 17, 2022, 3:37am UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725 "2022-12-17T03:37:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [December 17, 2022, 3:37am UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725/1 "2022-12-17T03:37:31Z")

</div>

I’m not a financial math wizard so it would be nice to find a decent collection of financial functions with the formulas already in XoJo format. Can anyone recommend any?

What I’m looking for at the moment is something that can calculate Compound Interest on an investment with a monthly deposit added.

I’ve been able to convert a formula I found on the web that will calculate simple compound interest. I haven’t been able to get anything I’ve found working that must allow for a monthly payment of the same amount each month.

I’m hoping to see the actual XoJo code and not need to purchase or install something I can’t examine. 🙂

---

<div class="post-metadata">

**Author:** ![Greg\_O](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o/32/22785_2.png) [@Greg\_O](https://forum.xojo.com/u/Greg_O)\
**Post date:** [December 17, 2022, 12:05pm UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725/2 "2022-12-17T12:05:12Z")

</div>

I don’t, but it’s **Xojo** , not XoJo.

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [December 17, 2022, 12:41pm UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725/3 "2022-12-17T12:41:37Z")

</div>

Here you go:

[https://dutch.ams3.digitaloceanspaces.com/xojo/compoundInterest.xojo\_binary\_project](https://dutch.ams3.digitaloceanspaces.com/xojo/compoundInterest.xojo_binary_project)

---

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [December 17, 2022, 3:59pm UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725/4 "2022-12-17T15:59:26Z")

</div>

DerkJ,

Thanks for the reply with this sample. Unless I’m missing something, which I don’t think I am, this doesn’t address my situation. I had stated in my message I was able to do the simple compound interest, but having problems trying to get more complex versions that allow you to contribute fixed monthly amount.

Do you have or know of a sample that shows that?

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [December 17, 2022, 4:21pm UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725/5 "2022-12-17T16:21:33Z")

</div>

> [@Steve\_Batson](#):
>
> simple compound interest, but having problems trying to get more complex versions that allow you to contribute fixed monthly amount

Looks like amortization. Watch this list (play it on youtube), find the part (list on the right side) that covers your needs, write the code based on it.

https://www.youtube.com/embed/PCbN2ayRm4E?feature=oembed&wmode=opaque&list=PLX2gX-ftPVXUYjs2g3YiaY0sEfwW-jg5L

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [December 17, 2022, 4:51pm UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725/6 "2022-12-17T16:51:47Z")

</div>

i must have misunderstoot that. The example project is as-is.

i have no library of special math functions for this, this is it. You can however pretty easily traslate the YT video or other language info to xojo.

---

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [December 18, 2022, 12:27am UTC](https://forum.xojo.com/t/any-decent-examples-or-collections-of-methods-for-financial-functions-in-xojo/73725/7 "2022-12-18T00:27:37Z")

</div>

Thanks all for the replies. I did find my solution. Part of the issue was getting the Parentheses in the right places when translating the formulas to Xojo. The other thing I found was that some on-line calculators I was trying to use to validate my results were showing different values. When I got my code working properly, some calculators matched my results and some did not. There’s obviously a few different methods / formulas being used…I’m not sure what the standard is. I’ll have to investigate that more.
