Commute time to work/school

Looking for an apartment near my university and no luck so far since I wanted one where I could easily commute to school by bike and it seems my options are very limited. I was wondering how and how long do other people usually take to commute to their work/school? And what is the most optimal duration and way to commute daily for everyone? For me I'd prefer living in a 5 kilo or less range from school where using either bike or train to commute would be alright. But I was curious as to see how long people would take to commute daily since I know a few people who could handle 30 minutes or more.

by Juiseii