Sometimes, the difference between a good and great movie can be determined right before the credits roll. Good movies can have unforgettable characters, classic dialogue and groundbreaking ideas, but often they’ll fizz out with a predictable ending (“Sleepless in Seattle”), too many false endings (“The Lord of the Rings: The Return of the King”) or no real ending at all (“Monty Python and the Holy Grail”). Great movies, like great athletes, know how to finish. A great story and a great third act will stick with viewers long after they leave the theater or eject the DVD. So as we get ready to put the final touches on 2010, let’s take a look at a few films that deliver when it counts.

10 “Star Wars: The Empire Strikes Back” (1980) and “The Lord of the Rings: The Two Towers” (2002)

These two films are grouped together because each is the middle child in its respective trilogy. They also happen to represent the best endings of any of the films in those trilogies.

The first “Star Wars” ended in dramatic if predictable fashion, as did the last. The first “Lord of the Rings” film featured a solid ending, but the last, as mentioned previously, didn’t seem to want to end at all. But the middle children brought it all together.

Whether it was the bittersweet escape from Cloud City in “Empire” or the heroic Battle of Helm’s Deep at the conclusion of “The Two Towers,” each film wove disparate story lines together with just enough catharsis to leave you feeling good while keeping you eager for what was to come.

9 “The Sixth Sense” (1999)

M. Night Shyamalan’s tale of a troubled boy who sees dead people triggered the modern era of “twist endings” and may have inadvertently handicapped his own career. But if you had to peak early as a filmmaker, doing so with a potent twist like Bruce Willis’ third-act epiphany isn’t a bad way to do it.

8 “Back to the Future” (1985)

As much as it was meant to be a fun look at 1950s culture, “Back to the Future” became an equally potent time capsule for the 1980s culture that spawned it. It’s hard to nail down the idea of an “ending” when you’re watching a movie about time travel, but this story of a teen (Michael J. Fox) who travels back in time in a modified DeLorean and meets his future parents has a truly heartwarming payoff.

7 “Tootsie” (1982)

While most of the films on this list are here because their endings sent messages that transcended their stories, “Tootsie” earns a spot on the sheer power of its comic writing. When unemployed stage actor Dustin Hoffman disguises himself as a woman to get a role on a New York soap opera, he triggers a chain of events that can only end badly. And when it does, it ends in unforgettable fashion.

6 “E.T.: The Extra-Terrestrial” (1982)

Even with heavyweights like “Schindler’s List” and “Saving Private Ryan” on his resume, Steven Spielberg’s buddy movie about an abandoned alien and the young child of a divorce carves out a special niche of its own. Spielberg went back to update the special effects with a 20th anniversary edition, but the emotional climax of the film’s third act didn’t need CGI to pull any heartstrings.

5 “Rocky” (1976)
Amy Sancetta, AP Photo

This story of a bum fighter who gets a shot at the big time set the precedent for just about every sports film that hits the screen today. But while so many of those films end with a predictable come-from-behind victory for the underdog, most forget the key point of “Rocky” — winning or losing often has little to do with true victory.

4 “American Graffiti” (1973)
Amazon.com

Before going on to make the first “Star Wars,” George Lucas directed this film as a tribute to the hot-rod culture of his Modesto, Calif., hometown.

Set on the last night of summer in 1962, “American Graffiti” follows an ensemble cast of teens (including Ron Howard and Harrison Ford) as the various dramas of their lives move toward a chilling final drag race.

3 “Butch Cassidy and the Sundance Kid” (1969)

The first film to team up longtime screen icons Paul Newman (Butch) and Robert Redford (Sundance), this 1969 film was considered a drastic change of course as far as Westerns were concerned. But even if Newman’s bicycle antics (set to “Raindrops Keep Falling on My Head”) don’t match your vision of the Old West, there’s no debating the impact of this film’s final dramatic freeze frame.

2 “The Graduate” (1967)
imdb.com

Dustin Hoffman’s leading man debut is the perfect vehicle for anyone who has just realized that adulthood isn’t quite what it was supposed to be. The quiet moment he shares with Katharine Ross, only seconds after what would have otherwise been interpreted as a cliched happily-ever-after ending, is one of the most truthful shots in movie history.

1 “Casablanca” (1942)

Set amid the turmoil of World War II, this romantic drama seems to turn up on everyone’s “best movies” list, no matter what the specific theme. But in spite of all the classic lines and immortal characters, the bittersweet ending at the airport is what makes “Casablanca” such a classic.