There are limits on how long you are permitted to study in the UK on a Student visa at different levels.
Courses below undergraduate degree level
You are permitted to study courses below degree level in the UK with a Student visa for up to two years.
Courses at undergraduate degree level
You are permitted to study a course at undergraduate degree level with a Student visa for up to 5 years unless you are studying an exempt course (e.g. architecture, medicine).
Courses at postgraduate degree level and above
There is no limit on study at postgraduate degree level and above.
How will the time limit be calculated?
The time limit is linked to the duration of your Student visa rather than the duration of your course/s. The time will normally be calculated from the start date of your first Tier 4/Student visa, until four months after you expect to complete your new course (i.e. the expiry date of a new Student visa). Any time during which you did not hold a valid Tier 4/Student visa will be discounted.