There is no a silver formula which tells you exactly the numbers behind. It all depends on particular implementation on kernel scheduler side.
If you're interested in details, you can check priority logic of default Linux kernel scheduler (Completely Fair Scheduler) e.g. here.
Copy-paste-for-the-future-visitors (in case the link will expire after a few years):
Every process has two priorities associated with it. One is called as
nice value of process. It ranges from -20 to 19, default being 0.
Lower the nice value, higher the priority. If there are two processes
having nice value as 5 (process 1)and 10 (process 2), process 1 has
We can check nice values of process’s nice values using ps -el command
on shell. In Kernel space it is translated as MAX_RT_PRIORITY + 20 +
nice value. It is stored in static_prio field of the task_struct.
Second priority is real-time priority. These have opposite notion,
means higher the value, higher the priority of the process. It ranges
from 0 to 100.
There is one more field which is present in task_struct called as
prio, which in turn stores the effective priority of process which is
being considered by scheduler to boost or thwart priority in order to
avoid cases like priority inversion.
In earlier schedulers priority values were used in decided the next
process and the time slice it gets on the processor. There were many
short-comings in that approach , very well described in book “Linux
Kernel Development” by Robet Love.
In CFS, instead of using priorities to decide absolute time a process
gets on processor, portion of processor time a process ought to get on
processor was calculated, based on the overall load of the system. If
a process is getting less than what it should get, it will eventually
move towards the left side of RB tree and get the processor time.