Im trying to convert the percentage of a level and its completion based on distance to the end object So in each level there is a spawn point and an end point, ive got the distance between the player and the end point but Im struggling to work out a percentage?

Logically Im guessing itd be to get the distance between spawn and end as well as player and end then im stuck, would it be something like distance between spawn and end multiplied by 100 divided by distance berween player and end point then round it to the nearest int?

Any help appreciated, thanks