How net run rate works
Two run rates over the whole tournament, one minus the other.
For, minus against
The NRR in a tournament is the average runs per over that a team scores across the whole tournament, minus the average runs per over that is scored against them across the whole tournament.
So add up every match first, then divide. Averaging the match figures gives a different answer source.
All out counts the full overs
If a team is bowled out, the calculations don't use the number of overs actually bowled, but the full quota of overs to which the team was entitled (e.g. 50 overs for a One Day International, and 20 overs for a Twenty20 match).
Tick all out, and that innings counts the overs a side you set, whatever the scorecard says.
The 1999 example, redone
The article works South Africa through the 1999 World Cup source. Our table gives the same answer: 4.263 − 3.404 = +0.859. See it filled in.
The chase
Runs needed is the target less the runs so far. Divide by the balls left, times 6, for the required rate; the runs so far over the balls bowled give the current one source. Target 181, 120 after 14.2 of 20: 61 from 34 balls, 10.76 needed against 8.37 so far.