Why the periods have these lengths: count the electrons the subshells hold
PeriodSubshells filledNumber of elements
11s2
22s 2p8
33s 3p8
44s 3d 4p18
55s 4d 5p18
66s 4f 5d 6p32
77s 5f 6d 7p32
Period of the elementRule for the group
2 and 3k = 1 or 2 gives group k; k = 3 to 8 gives group k + 10
4 and 5group = k (k runs from 1 to 18)
6 and 7k = 1 or 2 gives group k; k = 3 to 17 are La/Ac and the f-block (group 3); k = 18 to 32 gives group k − 14

Period = highest n. Block = subshell of the last electron. k = Z − previous noble gas: periods 2-3 group k (k ≤ 2) or k + 10; periods 4-5 group k; periods 6-7 group k (k ≤ 2), group 3 for k = 3 to 17, group k − 14 for k ≥ 18.

— Rule to remember

Locate elements with the noble-gas shortcut and confirm with the group formula for the block. The lengths 2, 8, 8, 18, 18, 32, 32 come from the subshells each period fills. Cr and Cu (and Mo and Ag) have one s electron, but their groups follow the same formula. Unnamed elements are named digit by digit with -ium.