Win-Win Ending

Stories thrive on Conflict, and to have conflict, a story must have at least two combatants. Typically, although the moral distinctions between one combatant and the other can be as clear and simple or murky and vague as one likes, we in the audience will be inclined to take sides and wish for one combatant (the hero) to prevail over the other (the villain). If the hero wins, we'll usually consider this a Happy Ending, and if the villain wins, we'll usually see this as a Downer Ending.

Conflict, however, does not always turn out to be a simple zero-sum game where someone has to lose in order for someone else to win. Sometimes, though a hero and villain's goals are seemingly irreconcilable, they can work out a compromise to their mutual benefit. Sometimes, heroes and villains can find a way to bypass each other on the way to achieving their goals. Sometimes rain falls on the just and the unjust alike, and both manage to bring in a good harvest. In short, some stories end in victory for the heroes and villains alike.

In many ways, this ending is likely to qualify as one of the happiest versions of the Happy Ending. Compare Sweet and Sour Grapes, which may contribute to this ending for either or both combatants. It may also be especially common in stories where both sides are Only in It For the Money and there's more than one way to get paid. This might also be the result of Cut Lex Luthor a Check if it happens because the villain decides to cash in on his legitimate (or not-so-legitimate) talents.

Needless to say, this is an Ending Tropes, so expect spoilers.

Anime and Manga

 * At the end of Macross 7 the Protodevlin discover that
 * In Naruto, the very long-running villain Pain realizes that his and Naruto's goals are the same but winds up.
 * Many villains in One Piece end up being even more well-off than before they took on (and got clobbered by) the heroic Straw Hat Pirates. The most prominent case is Wapol, who was previously an oppressive king in a failing kingdom and, indirectly due to the Straw Hats' meddling, became a CEO for a toy company and now makes weapons-grade metal for the World Government's military (that only he can make). Both positions make more money than he ever made as king.
 * Irresponsible Captain Tylor has this. Episode 23 features the conflict between Earth and the Raalgon coming to its climax... and then Tylor, the leader of Earth's forces, refuses to fire on the enemy, instead opting to pass through their lines peacefully. His unnatural luck, paired with his counterpart Dom's sense of honor (both of them repeatedly countered orders to fire from subordinates, believing in the other), caused the great conflict's final battle to end without bloodshed - a sympathetic retired admiral on Earth sent a message to both commanders congratulating them for both achieving victory (by going for peace).
 * Irresponsible Captain Tylor has this. Episode 23 features the conflict between Earth and the Raalgon coming to its climax... and then Tylor, the leader of Earth's forces, refuses to fire on the enemy, instead opting to pass through their lines peacefully. His unnatural luck, paired with his counterpart Dom's sense of honor (both of them repeatedly countered orders to fire from subordinates, believing in the other), caused the great conflict's final battle to end without bloodshed - a sympathetic retired admiral on Earth sent a message to both commanders congratulating them for both achieving victory (by going for peace).

Comic Books

 * In the Elf Quest Holiday Special episode there's a major grudge fight between Cutter and Rayek where they almost end up killing each other. The win-win part is that it lets Cutter burn out his (admittedly justified) aggression toward Rayek, allowing them to become allies, if not actual friends just yet.

Fairy Tales

 * In Bearskin, a soldier successfully escapes the Deal with the Devil he made out of desperation with a tidy profit, and gets a loving wife too. As for the devil, he proudly announces at the end that although he lost the soldier's soul, he gained the souls of his two new sisters-in-law in exchange.

Film

 * Interestingly, Win Win only sort of has a Win Win Ending. Sure, Leo gets to stay in his own house, Kyle gets to stay in New Providence and Cindy is out of the immediate picture - but she gets $1500 a month for nothing while Mike has to take a second job and Kyle may have blown his chance at a wrestling scholarship.

Literature

 * How the Grinch Stole Christmas ended with the Grinch being reintegrated into Whoville to everyone's benefit.
 * Both the animated and live action movie adaptations of this story heavily implied that his thieving in some ways opened the Whos' eyes to how overly materialistic they'd been about Christmas, such that the moral reformation was a two-way street.
 * In Treasure Island, the heroes did finally get their treasure. So did the villain Long John Silver, who escaped justice with several hundred pounds of it. In the words of protagonist Jim Hawkins, "I think we were all pleased to be so cheaply quit of him."
 * Disney's Treasure Planet, being a straight In Space adaption of Treasure Island, has the same 'everybody goes home happy' ending, including Silver escaping with a bit of treasure and his freedom.

Newspaper Comics

 * In Dilbert, the much-despised Pointy-Haired Boss often comes into conflict with his workers over their efforts to do as little work as possible and still get paid—but not always.

Real Life

 * Almost the definition of commerce if it works as intended (note the qualifier). For instance the Chinese had a great craving for jade and The Roman Empire had a great craving for silk and after a Chain of Deals through the silk road by relays of Intrepid Merchants, each managed to get it. A little more complicated then a simple trade as Romans didn't have jade but they did have gold which could buy jade in central Asia.

Video Games

 * In the Firestorm extension for Command & Conquer: Tiberian Sun, both GDI and Nod are better off at the term of their Enemy Mine situation.

Western Animation

 * Animaniacs: Wakkos Wish ends with.