When running top -b -n 1, the command always returns the same CPU values. Consider the following test run 5 times in succession:
[user@server ~]$ top -b -n
Here's an example to computes total CPU usage for ALL processes in top. I use -d flag to increase the default interval in order to smooth out the value. Not using tail because the header can be specific to Linux distribution.
top -b -d 5 -n 2 | awk '$1 == "PID" {block_num++; next} block_num == 2 {sum += $9;} END {print sum}'