4 years would perhaps be typical for a baccalaureate (Bachelor of/in Science, BS). Then about 2 years for Master of Science (MS). Then perhaps 2-4 years of PhD. Then can be some acceleration if one allows for overlap or heavy course schedule.
It also depends upon one's preparation prior to university. Some can take calculus and advanced analysis in high school, where as others must wait until university.