Before I start, yes I do wish I'd paid more attention in math's class...! ;-)

I need to create a formula to sell a product based on the number of people using it.

So, if only 10 people in a company use it, then the company pays a maximum of, say, $10 per user. However, at 5000 users they should pay a lot less per-user, say, $1 per user. The maximum should be $10 per user and the minimum should be $1 per user (for 10 users and 5000 users respectively). If a company has 10,000 users they should still pay $1 per user.

I have included a chart to hopefully simplify this:

Can anyone help devise a formula that would give me a price per user based on the number of users entered?

For 50<P<5000; price = 10 - (9/4950)/(p-50) = 10 - (9p-450)/4950

For P>=5000; price=1