Percentage Question - Sub operation within main operation percentage

70 Views Asked by At

This is probably a really basic question but I'm trying to work out how to calculate a percentage complete of an operation that occurs as part of a larger operation.

If the main operation is 20% complete and I then start a sub operation within this main operation which iterates 5 times to calculate something and each of those iterations represents a 20% portion then how do I calculate the percentage completion of the sub operation relative to the main operation? Obviously I can't just calculate the sub operation's percentage out of 100% as it will start at 0% and not 20% which is where it should start. I hope that makes sense. If it needs more explanation then I'm happy to try and provide some more detail!

EDIT: Here's an example of what I'm trying to explain:-

Outer operation currently at 20%
Inner operation now starts at 0% and iterates 10 times (10%, 20%, 30%, etc). How do I scale/refactor the sub operation percentages to account for it being part of a larger operation? So I wouldn't want the inner operation to start at 0% but 20% and then each increment should reflect the fact that it is part of the outer operation. Does that make sense?

1

There are 1 best solutions below

0
On

You need to assign a percentage to the sub operation. You are currently $20\%$ done. What percentage done will you be when the sub operation completes? Maybe you will then be $50\%$ done, which says the sub operation is $30\%$ of the work. If you do five run throughs, each one is then $6\%$ of the total, $\frac 15 \cdot 30\%$