It only depends on how long your course program is and how long you can stay.  Generally, you can stay in the UK for five (up to) years. If it's below graduate level, you can stay in the UK for up to two years.