calc_interval now throws ValueError when there are insufficient elements.