From Oxford's quads to Harvard Yard and many a steel and glass palace of higher education in between, exams are giving way to holidays. As students consider life after graduation, universities are facing questions about their own future. The higher-education model of lecturing, cramming and examination has barely changed for centuries. Now, three disruptive waves are threatening to upend established ways of teaching and learning.

On one front, a funding crisis has created a shortfall that the universities' brightest brains are struggling to solve. Institutions' costs are rising, owing to pricey investments in technology, teachers' salaries and galloping administrative costs. That comes as governments conclude that they can no longer afford to subsidise universities as generously as they used to. American colleges, in particular, are under pressure: some analysts predict mass bankruptcies within two decades.

At the same time, a technological revolution is challenging higher education's business model. An explosion in online learning, much of it free, means that the knowledge once imparted to a lucky few has been released to anyone with a smartphone or laptop. These financial and technological disruptions coincide with a third great change: whereas universities used to educate only a tiny elite, they are now responsible for training and retraining workers throughout their careers. How will they survive this storm--and what will emerge in their place if they don't?

Universities have passed most of their rising costs on to students. Fees in private non-profit universities in America rose by 28% in real terms in the decade to 2012, and have continued to edge up. Public universities increased their fees by 27% in the five years to 2012. Their average fees are now almost $8,400 for students studying in-state, and more than $19,000 for the rest. At private colleges average tuition is more than $30,000 (two-thirds of students benefit from bursaries of one sort or another). American student debt adds up to $1.2 trillion, with more than 7m people in default.

For a long time the debt seemed worth it. For most students the "graduate premium" of better-paid jobs still repays the cost of getting a degree (see "Free exchange: Wealth by degrees"). But not all courses pay for themselves, and flatter graduate salaries mean it takes students longer to start earning good money. Student enrolments in America, which rose from 15.2m in 1999 to 20.4m in 2011, have slowed, falling by 2% in 2012.

Small private colleges are now struggling to balance their books. Susan Fitzgerald of Moody's, a credit-rating agency, foresees a "death spiral" of closures. William Bowen, a former president of Princeton University, talks of a "cost disease", in which universities are investing extravagantly in shiny graduate centres, libraries and accommodation to attract students.

Politically, the mood has shifted too. Both Bill Clinton and Barack Obama have said that universities face a poor outlook if they cannot lower their costs, marking a shift from the tendency of centre-left politicians to favour more public spending on academia. Cuts made by state governments have been partly offset by an increase in federal "Pell Grants" to poor students. But American universities will soon receive more money from tuition fees than from public funding (see chart 1).

In Asia tuition-fee inflation, running at around 5% for the past five years among leading universities, has stoked middle-class anxieties about the cost of college. Latin American countries fret about keeping fees low enough to expand the pool of graduates. In Europe high levels of subsidy, coupled with lower rates of college attendance, have insulated universities. But fees are going up: in 1998 Britain introduced annual tuition fees of just £1,000 (then $1,650), which by 2012 had increased to a maximum of £9,000 ($13,900).

Rising costs could scarcely strike at a worse time. Around the world demand for retraining and continuing education is soaring among workers of all ages. Globalisation and automation have shrunk the number of jobs requiring a middling level of education. Those workers with the means to do so have sought more education, in an attempt to stay ahead of the labour-demand curve. In America, higher-education enrolment by students aged 35 or older rose by 314,000 in the 1990s, but by 899,000 in the 2000s.

Improvements in machine intelligence are enabling automation to creep into new sectors of the economy, from book-keeping to retail. New online business models threaten sectors that had, until recently, weathered the internet storm. Carl Benedikt Frey and Michael Osborne, of Oxford University, reckon that perhaps 47% of occupations could be automated in the next few decades. They find that the odds of displacement drop sharply as educational attainment rises.

iPad illuminatio mea

So demand for education will grow. Who will meet it? Universities face a new competitor in the form of massive open online courses, or MOOCs. These digitally-delivered courses, which teach students via the web or tablet apps, have big advantages over their established rivals. With low startup costs and powerful economies of scale, online courses dramatically lower the price of learning and widen access to it, by removing the need for students to be taught at set times or places. The low cost of providing courses--creating a new one costs about $70,000--means they can be sold cheaply, or even given away. Clayton Christensen of Harvard Business School considers MOOCs a potent "disruptive technology" that will kill off many inefficient universities. "Fifteen years from now more than half of the universities [in America] will be in bankruptcy," he predicted last year.

The first MOOC began life in Canada in 2008 as an online computing course. It was 2012, dubbed the "year of the MOOC", that generated vatic excitement about the idea. Three big MOOC-sters were launched: edX, a for-profit provider run by Harvard and the Massachusetts Institute of Technology (MIT); Coursera, partnered with Stanford University; and Udacity, a for-profit co-founded by Sebastian Thrun, who taught an online computing course at Stanford. The big three have so far provided courses to over 12m students. Just under one-third are Americans, but edX says nearly half its students come from developing countries (see chart 2). Coursera's new chief executive, Richard Levin, a former president of Yale University, plans an expansion focusing on Asia.

For all their potential, MOOCs have yet to unleash a Schumpetarian gale of disruption. Most universities and employers still see online education as an addition to traditional degree courses, rather than a replacement. Many prestigious institutions, including Oxford and Cambridge, have declined to use the new platforms.

Nick Gidwani, the founder of SkilledUp, an online-course directory, compares the process to the disruption of publishing and journalism. Large publishers used to enjoy a monopoly on printing presses, subscriber bases and deals with advertisers. A proliferation of low-cost blogs, websites and apps means they no longer do. Even successful print products have had to take on aspects of their digital rivals' model. Mr Gidwani sees "scant hope for 200 professors, all delivering the same lecture".

Traditional universities have a few trump cards. As well as teaching, examining and certification, college education creates social capital. Students learn how to debate, present themselves, make contacts and roll joints. How can a digital college experience deliver all of that?

The answer may be to combine the two. Anant Agarwal, who runs edX, proposes an alternative to the standard American four-year degree course. Students could spend an introductory year learning via a MOOC, followed by two years attending university and a final year starting part-time work while finishing their studies online. This sort of blended learning might prove more attractive than a four-year online degree. It could also draw in those who want to combine learning with work or child-rearing, freeing them from timetables assembled to suit academics. Niche subjects can benefit, too: a course on French existentialism could be accompanied by another university's MOOC on the Portuguese variety.

Some universities are already adding digital classes to their syllabuses. In Brazil, Unopar University offers low-cost degree courses using online materials and weekly seminars, transmitted via satellite. In America, Minerva University has entry criteria to rival the best Ivy League colleges, but far lower fees (around $10,000 a year, instead of up to $60,000). The first batch of 20 students has just been accepted for Minerva's foundation year in San Francisco, and will spend the rest of their course doing online tutorials while living outside America, with an emphasis on spending time in emerging economies as a selling-point to future employers.

Error 404: Degree not found

Online learning has its pitfalls. A pilot scheme at San Jose State University in California, offering a maths and statistics course run by Udacity, was suspended last year. Whereas 30% of campus students passed an entry-level algebra course, 18% of those studying online did--and the gap widened as material became more complex. "MOOCs' pedagogy needs to improve very quickly," admits Udacity's Mr Thrun. He thinks the San Jose experiment showed that students needed more personalised support to use a university-level online course. A survey of MOOC students in America found that 70% already had a degree. If they are to compete with ordinary universities, MOOC providers must get better at teaching newcomers to academia. EdX's Mr Agarwal wants to offer more courses during vacation-time, when students could use them to earn extra credit or to catch up on missed topics.

Detractors point to high dropout rates: only about 10% of first-time MOOC subscribers finish their course. That may not reflect badly on what is offered: the negligible cost of enrolment means that many people sign up without the firm intention to finish the course. But since the providers make most of their money from the certificates they grant to completers, maintaining a reasonable completion rate is important. Some are refining their courses to make the early stages easier to follow. EdX discovered that most dropouts happen quite quickly, in the same way that first-year university students sample courses before deciding which to pursue for their degree credits.

Another worry is that students can cheat by getting someone else to sit online tests in their place. The iversity, a German online college founded last year, is trying to get around this by holding in-person exams with an invigilator present. Coursera offers paid-for identity-verification services, which involve recording students' unique typing patterns.