Calculate avg. length