Bringing a television show to its end is no easy task. Sometimes fan favorites are canceled by networks and streaming services before they get the chance to run their natural course. Other times they overstay their welcome, and there’s no one around anymore to see how it all ends. But even when a series is allowed to wrap things up on its terms, there’s no guarantee that the writers will get it right. Remember Game of Thrones? Yeah, so that happened. Still, every now and then, there are shows that discover the recipe for the perfect finale and are able to execute it without flaw. From M*A*S*H to, yes, Seinfeld, here are the 15 greatest series finales of all time.

RELATED: 10 Of The Most Memorable Pilot Episodes From the 21st Century

15 M*A*S*H, "Goodbye, Farewell and Amen"

mash-finale
Image via CBS

Way back in 1983, about 105 million Americans stopped everything they were doing to watch the final episode of the wartime dramedy M*A*S*H. No other show has come close to this number since. Directed by Alan Alda himself, “Goodbye, Farewell and Amen” has the medical camp crew coming to terms with the fact that the Korean War is coming to an end, which means that they’re finally returning home. It’s an emotional goodbye to a show that lasted 11 seasons -- much longer than the three-year conflict that inspired it. The episode also features one of the most traumatic revelations in TV history, with Hawkeye (Alda) realizing that his memory of a woman suffocating a chicken to keep it quiet during an enemy attack is actually that of a mother accidentally killing her child.

14 The Wire, “-30-”

The Wire Finale Image
Image via HBO

The Wire was always a show unafraid of tackling the ugliest parts of life in American cities -- and, sometimes, even the most beautiful. The series' fifth and final season is far from being its best, but it sure ends with bang, reminding us that hope and despair walk side by side. As Bubbles (Andre Royo) enjoys a meal with his sister and Dukie (Jermaine Crawford) spirals into drug addiction, we are left without an actual satisfying conclusion to the show’s many storylines. Alas, life has no such thing as satisfying conclusions. The only thing of which we can all be certain is that the system is just waiting for the right moment to grind us down.

13 Breaking Bad, “Felina”

Walter White exploring his old lab, touching a metal tank
Image via AMC

“Felina” isn’t exactly the end of Breaking Bad. That title belongs to 2019’s Jesse-centric (Aaron Paul) El Camino: A Breaking Bad Movie. Still, as far as this show goes, this is where viewers were left: Walter (Bryan Cranston) completed his transition from hero to villain, admitting to both himself and Skyler (Anna Gunn) that it was not his family that moved him, but his own selfish whims. After five years of disease, drug dealing, and violence in all its shapes and forms, Walt lost everything that once made him a good man. A tragic ending for a tragic anti-hero, but at least he got to go out on his own terms.

12 Crazy Ex-Girlfriend, "I'm in Love"

crazy-ex-girlfriend-finale
Image via The CW

Crazy Ex-Girlfriend, as a whole, is a show that deserves a lot more love. And its finale deserves to be recognized as one of the all-time greats. Is "I'm in Love" inconclusive? Yes, but it's as conclusively inconclusive as an episode can get, and that's beautiful. Which member of her love quadrangle will Rebecca (Rachel Bloom) pick? Will she succeed in her attempt at being a composer? Does it matter? No, it doesn't. What matters is that Rebecca now knows that she is worthy of love and of living her best life. What a powerful message for a rom-com series that was, at its core, an essay about the hardships of navigating human relationships while mentally ill.

11 The Leftovers, “The Book of Nora”

Justin Theroux and Carrie Coon as older Kevin and Nora at a party in The Leftovers.
Image via HBO

In a show about grief, it was love that took the center stage in the very last episode. Despite giving a fair share of room for The Leftovers’ ensemble cast, “The Book of Nora” focuses on the romance between Nora (Carrie Coon) and Kevin (Justin Theroux) to give fans a heartfelt, hopeful goodbye. Amidst everything, there’s a story about a place where the departed might’ve gone, but none of it really matters. All that matters is that Kevin, Nora, and all the other leftovers are together in the here and the now.

10 Bojack Horseman, “Nice While It Lasted”

bojack-horseman-season-6-episode-16-series-finale
Image via Netflix

Much like Crazy Ex-Girlfriend, Bojack Horseman had a lot more going on beneath its wacky surface. What started as a raunchy comedy with talking animals about a washed-up sitcom star quickly became one of the most brutal depictions of addiction and the effects that fame can have on someone’s mental health that has ever appeared on television. If you’re a longtime fan of the show, chances are that you finished at least one season completely destroyed, but also feeling like you had the time of your life. Season 6’s finale, “Nice While It Lasted,” preserves the overall vibe of the series, delivering an entertaining half an hour of television, but keeping things real. Bojack (Will Arnett) isn’t absolved of all the terrible things he did, and neither should he, but that doesn’t mean there isn’t hope for the future.

9 Friends, “The Last One”

friends-the-last-one
Image via NBC

The sitcom that defined the 90s, Friends came to its conclusion in 2004, after 10 years on the air. During its run, the sextet of 20-something New Yorkers grew closer and closer to one another, and ended up becoming friends of sorts to their own audience. Saying goodbye to them wasn’t easy, but it didn’t feel wrong. As Monica (Courteney Cox) and Chandler (Matthew Perry) closed the door to their impossibly large apartment for good, they entered a new phase of adulthood that could only be explored in a completely different show. And as much as the internet loves to hate on Ross (David Schwimmer) for being a manchild, his final kiss with Rachel (Jennifer Aniston) was the much expected culmination of a will-they-won’t-they for the ages.

8 Cheers, “One for the Road”

cheers-finale-sam-and-diane

Who is your true love? Is it that old flame you spent years pining over? Or is it the people that have stayed with you every step of the way? For five of its 11 seasons, Cheers featured one of the most memorable will-they-won't-they romances of TV history between Sam (Ted Danson) and Diane (Shelley Long). So when Diane, who departed after the fifth season, came back at the beginning of this 90-minute-long finale, it was only natural for fans to believe that Sam would drop everything to reunite with her. But, in the end, he just couldn’t bring himself to leave those that he truly loved the most: his friends and that wonderful place “where everybody knows your name."

7 Six Feet Under, “Everyone’s Waiting”

six-feet-under-finale-cast
Image via HBO

How do you make death not only beautiful, but full of joy? Well, just ask Alan Ball and the team of writers behind Six Feet Under. “Everyone’s Waiting” takes viewers on a journey through the lives of all of its main characters, culminating in their deaths. In a show about how life and death are inextricable from one another, seeing our protagonists live full lives before saying their final goodbyes felt not just right, but the only possible way of ending things.

6 ER, “And in the End…”

er-finale-and-in-the-end
Image via Warner Bros. Television

After 15 seasons, the hit medical drama ER came to a close with a graceful ending that many long-lasting procedurals can only dream of. “And in the End …” allowed the show’s cast and fans a long farewell to everyone that played an important part in the history of Cook County General Hospital, and took some time to honor those that didn’t make it to the finale. Instead of going out with a bang, ER landed softly with the recognition that, more often than not, it is the journey that matters, and not the destination.

5 PEN15, “Home”

pen15-finale-home
Image via Hulu

In only a pair of seasons, PEN15 manages to capture the ridiculousness and the pain of pre-adolescence like no other show on television. Its finale, “Home,” sums up the series’ energy perfectly. After undergoing a series of traumas and running away from home, Maya (Maya Erskine) and Anna (Anna Konkle) have a heart-to-heart about the hardships that await their friendship in the future. But there’s no time to dwell on the horrors of growing up. They have their own problems to deal with right now, and they must deal with them middle-school weapons. There’s no knowing whether that will suffice in the future, but, for now, everything is okay.

4 Better Call Saul, “Saul Gone”

better-call-saul-finale-black-and-white-social-featured
Image via AMC

Putting an end to an original story is already difficult enough, let alone putting an end to a prequel. How do you close off a story that everyone knows isn’t finished yet? Better Call Saul Season 6’s “Saul Gone” had the nearly impossible task of showing us the conclusion of Jimmy McGill’s transformation into Breaking Bad's Saul Goodman (Bob Odenkirk), and it did so with mastery and finesse. “Saul Gone” is a bittersweet story about reckoning with one’s own past and the possibilities of redemption. In the end, Jimmy gets to reclaim his name, but Saul Goodman will follow him wherever he goes -- even if he’s not going many places anymore.

3 Black Sails, Season 4, Episode 10

black-sails-finale
Image via Starz

Piracy drama Black Sails kicked off its first season in 2014 with the promise of adventure, and, for the next three years, it delivered just that. By Season 4, tensions had escalated to a full-blown war between pirate factions and a rebellion against the English Empire. But some rebellions are doomed to fail, and some wars can never truly be fought. However, that doesn’t mean there isn’t solace to be found amid the rubble of our dreams. Black Sails’ ending is a bittersweet one, with Captain Flint (Toby Stephens) finally reuniting with his long-lost love, albeit in less than ideal circumstances, and John Silver (Luke Arnold) one step closer to the classic Treasure Island villain that he will become, even if he doesn’t know it yet.

2 The Good Place, “Whenever You’re Ready”

the good place finale image
Image via NBC

What kind of world, if any, awaits us after death? And what lies beyond that? The Good Place doesn’t have the definitive answer to any of these questions, but it sure offers a compelling theory about what life after death might look like. Well, okay, maybe not in its first four seasons, in which four regular people are given hell -- literally -- for the crime of not being perfect. But in its final episode, Season 4’s “Whenever You’re Ready,” Eleanor (Kristen Bell), Chidi (William Jackson Harper), Tahani (Jameela Jamil), and Manny (Jason Mendoza), along with everyone else, are given the opportunity to live their afterlives to the fullest and end it in their own terms. It’s a beautiful finale that reminds us that all things must come to an end -- even life, even death, and even our favorite TV shows.

1 Seinfeld, “The Finale”

seinfeld-finale-cast
Image via NBC

This one is a little divisive, but bear with me for a second. What better way to end a show about a horrible group of horrible friends than reminiscing about every single terrible thing they’ve done and then having them pay for their misdeeds? After nine seasons of stealing rye and destroying small restaurants, among other things, Jerry (Jerry Seinfeld), George (Jason Alexander), Kramer (Michael Richards), and Elaine (Julia Louis-Dreyfus) finally get their just deserts. A parade of wronged neighbors, would-be-friends, and dates are called to the stand to testify about everything they endured in the hands of the Seinfeld gang. As Jerry and his friends come to terms with the fact that they are shitty human beings, we get to laugh at them and with them at the same time. What else can we possibly want?