(D + P1 + P2 + P3 + ...) / (D + P) * 100 is the correct formula where P1, P2 etc. is the amount of work the process Pi has done (with 1 as maximum). If the processes that are still running all have the same percentage, then it's a bit easier. It's just
(D + Pp)/(D + P) * 100 where Pp is the percentage (with 0 as minimum and 1 as maximum) done for the processes still running.