Need help calculating the price

Hello, I am creating a League of Legends boosting website. The user can select his current rank and his desired rank. The ranks are:
Silver 4
Silver 3
Silver 2
Silver 1
Gold 4
Gold 3
Gold 2
Gold 1
Platinum 4
Platinum 3
Platinum 2
Platinum 1

The prices are:
silver4-silver3 16$
silver3-silver2 19$
silver2-silver1 22$
silver1-gold4 23$

Gold4-gold3 28$
gold3-gold2 31$
gold2-gold1 34$
gold1-platinum4 38$

platinum4-platium3 44$
plat3-plat2 48$
plat2-plat1 52$
plat1-diamond4 55$

If the user’s current rank is silver 3 and the desired rank is gold 1 then the price should be $34 + all other amounts below. So 34+31+28+23+22+19+16= $173. How can calculate the price automatically?

Here’s the editing page: https://bubble.io/page?name=index&id=leagueofle&tab=tabs-6

This topic was automatically closed after 70 days. New replies are no longer allowed.