Pro Rata Calculation before editing subscription

Pro Rata Calculation before editing subscription

Hello 
We have a user flow we had no idea how to solve. Maybe you have any ideas.

When a customer wants to upgrade his subscription in the middle of his billing cycle, we need to show him (in the product interface) the sum he will be charged immediately. (screenshot)

How can I get the sum with API without editing his current subscription or creating a new invoice?

I really appreciate any help you can provide.