'Remaining prize pool' / 'Chips in Play' x 'Player Chips'
Ignoring player skill, this is how to calculate your individual ICM value.
eg. $500 prize pool, 100,000 chips (lets say 5000 chips x 20 players), you have 12,000 chips, this also implies that if there was no tournament fee then your buyin was $25.
So, if there have been no payouts made yet, your ICM value is 500/100000x12000 = $60
Once the payouts have started, then you must remove any payouts already made from the total prize pool. The total chips never change. There are many ICM tools available online, I like this one:
https://www.icmpoker.com/icmcalculator/#
At least this is how i think it works.