Swinson won 47,997 votes against 28,021 for Ed Davey on a turnout of 72%, it was announced at a party event in central London.
Cable formally announced in May he was stepping down from the role, sparking the leadership contest, in which only Swinson and Davey put their names forward.
Cable took over from Tim Farron following the 2017 general election, when Farron managed only a relatively small gain in the party’s number of MPs – from eight to 12 – well down on the 57 acquired in the 2010 election, after which the LibDems went into coalition with David Cameron’s Conservatives.
There had been pressure on Cable to go after what was seen as a sometimes uninspiring performance as leader, but the former business secretary was buoyed as the party climbed in the polls and achieved impressive results in local and European elections in May.
In the local elections, the LibDems gained more than 700 councillors and 10 councils, while at the European elections soon afterwards the party’s strongly anti-Brexit stance helped it come second, with a 15% share of the vote and 16 MEPs.
In recent weeks, the LibDems have also acquired a new MP – Chuka Umunna, via Labour and Change UK – and the party is hopeful of welcoming more defectors from the rump of post-Change UK independents or from among disaffected Conservative or Labour MPs.
The party is predicted to gain another Westminster representative next week in the Brecon and Radnorshire byelection. The LibDems are tipped to take the seat from the Conservatives, helped in part by the decision of the Greens and Plaid Cymru to step aside.