I couldn't do better with the title so let me try and explain:
Say I have two numbers: items and rank.
items is the number of items in a sorted list.
rank is the rank of the item I'm concerned with.
If items=8 and rank=1, I would like the percentage to be 100%.
If items=8 and rank=8, I would like the percentage to be 0%.
What should the percentage be if items=8 and rank=3? I want to be able to figure this out for any rank.
I would greatly appreciate a solution with an explanation, and a name for what this concept is called.
Thank you.