Make users do calculation

Hi everyone!

I am trying to add an food equivalence tool in my app where users would be able to add the quantity of a specific food they need to eat, and it would give them back the quantity they could be eating of a different ingredient.

I have my tables where I have the equivalence for each food, but I can’t manage to find a way of enable users to add a value in the app and do a calculation based on this.

Do you guys think it is feasible?


Can you show us the data structure you currently have? I assume it would be something like 1 item A equals 2 item B?

Attached you can see how the table is structure at the moment.

We are showing for 100g of 1 ingredient (Column A) how much it is for another ingredient (Row 1)
As it is shown as a list at the moment in the app, my users have to do the calculation on their own if they want to know how much of another ingredient they can eat, if in their nutritional plan they have 65g of a food.

What I would like them to be able to do is to have a input in their app, where they can type the quantity they have an ingredient in their nutritional plan, and automatically see how much of another ingredient they could eat.