We give a pedagogical introduction of the stochastic variational method and show that this generalized variational principle describes classical and quantum mechanics in a unified way.