A general method, which we call the potential $S$-matrix pole method, is developed for obtaining the $S$-matrix pole parameters for bound, virtual and resonant states based on numerical solutions of the Schrodinger equation. This method is well-known for bound states. In this work we generalize it for resonant and virtual states, although the corresponding solutions increase exponentially when $rtoinfty$. Concrete calculations are performed for the $1^+$ ground and the $0^+$ first excited states of $^{14}rm{N}$, the resonance $^{15}rm{F}$ states ($1/2^+$, $5/2^+$), low-lying states of $^{11}rm{Be}$ and $^{11}rm{N}$, and the subthreshold resonances in the proton-proton system. We also demonstrate that in the case the broad resonances their energy and width can be found from the fitting of the experimental phase shifts using the analytical expression for the elastic scattering $S$-matrix. We compare the $S$-matrix pole and the $R$-matrix for broad $s_{1/2}$ resonance in ${}^{15}{rm F}$