Complex calculations Mobile Beta

Hi,

I’m developping an app for calculating Net Present Values, Internal Rates of Return and a bunch of stuff that we can’t just calculate using abitrary text inputs.

Is there a way to do this in Mobile Beta?

Thanks in advance for the help

Mike

Hi Mike,

Yes you can do complex financial calculations in Bubble including Mobile Beta. Here are your options:

  1. Use Bubble’s built-in math operators - you can chain calculations using the expression editor. For NPV and IRR you would need to build the formulas step by step using custom states or database fields to store intermediate values.

  2. Use a plugin like the Toolbox plugin which has a JavaScript element. This lets you write custom JavaScript for complex math like IRR which requires iterative calculations. You would pass your cash flows to the script and return the result.

  3. Connect to an external API - there are financial calculation APIs that can handle NPV, IRR, and similar functions. You send your data and get back the calculated result.

  4. Backend workflows - for heavy calculations you can run them in a backend workflow to avoid slowing down the frontend.

For IRR specifically, since it requires iteration to solve, the JavaScript approach in Toolbox is probably your cleanest option. NPV is simpler and can be done with Bubble’s native math.

Let me know if you need help with the specific formulas.

Thanks amjad! I’m new to Bubble so I didn’t know of all these possibilities. I will most propbably go for Javascript :wink:

Hi Amjad, I have installed the plugin Toolbox but I can’t see how to make it work in Mobile Beta. The documentation seems very clear for Web apps but not for Mobile Beta.

Can you hint me here?

Thanks in advance,

Michael