The maximum number of electrons in an orbit can be calculated by
2n2
The maximum number of electrons in an orbit is obtained by 2×n2, where n is the shell number.
For example number of electrons in K shell i.e. in 1st orbit
Here n=1, by using 2×n2 we get maximum number of electrons in K-shell i.e. 1st shell = 2.