Using stochastic methods, general formulas for average kinetic and potential energies for anharmonic, undamped (frictionless), classical oscillators are derived. It is demonstrated that for potentials of |x| ν (ν > 0) type energies are equipartitioned for the harmonic potential only. For potential wells weaker than parabolic potential energy dominates, while for potentials stronger than parabolic kinetic energy prevails. Due to energy conservation, the variances of kinetic and potential energies are equal. In the limiting case of the infinite rectangular potential well (ν → ∞) the whole energy is stored in the form of the kinetic energy and variances of energy distributions vanish.