A condition in which the ovaries stop functioning normally before age 40.