Quantifying electron localization in quantum confined systems remains challenging, especially for excited states. A quantum dot (QD) is represented by a helium atom in a finite oscillator potential. The effect of dot width variation on the electron localization in QD is systematically examined via Shannon entropy for low-lying doubly excited states (2s21Se, 2p21Se, 2s3s 1Se) obtained using highly correlated Hylleraas functions. In particular, the most effective dot width where the electron density is the most localized is determined successfully and justified by the electron density plot for all three states.