How many electrons can each shell in an atom hold?
$$\text{Electron Capacity for a shell} = 2n^2$$

where, n represents the Principal Quantum Number, a.k.a. energy level.

Keep in mind that an energy level need not be completely filled before electrons begin to fill the next level because beyond the fourth energy level, you would get into theoretical subshells.

See this.