A method for the mode calculation of arbitrarily shaped waveguide with near-ideal section is proposed. Two formulae for the electromagnetic field and the propagation constant calculation are derived from the perturbation theory. By using these two formulae, the dispersion characteristics of a ladder-shaped waveguide is conveniently given.