Two-legged tie

In sports (particularly association football), a two-legged tie is a contest between two teams which comprises two matches or "legs", with each team as the home team in one leg. The winning team is usually determined by aggregate score, the sum of the scores of the two legs, for example, if the scores of the two legs are: Then the aggregate score will be Team A 5–3 Team B, meaning team A wins the tie. In some competitions, a tie is considered to be drawn if each team wins one leg, regardless of the aggregate score. Two-legged ties can be used in knockout cup competitions and playoffs.
 * First leg: Team A 4–1 Team B
 * Second leg: Team B 2–1 Team A

In North America, the equivalent term is home-and-away series or, if decided by aggregate, two-game total-goals series.

Use
In association football, two-legged ties are used in the later stages of many international club tournaments, including the UEFA Champions League and the Copa Libertadores; in many domestic cup competitions, including the Coppa Italia and the Copa del Rey; in domestic league play-offs, including the Football League play-offs; and in national-team playoffs in some qualification tournaments, including FIFA World Cup qualification.

In ice hockey, the National Hockey League used two-game, total-goals series in the early years of its playoffs. It applied to all its playoffs from 1918 to 1926, and the early rounds until 1937, when it completed the switch to best-of-n series; Rendez-vous '87 (which pitted a team of NHL All-Stars against the Soviet Union) was the only two-legged tie to be held in the league's history after 1937. The NCAA Men's Ice Hockey Championship also used a two-game total goals format for much of its history.

In rugby union, two-legged matches are used in the qualifying stages of the Rugby World Cup. The semifinals of the Italian National Championship of Excellence are also two-legged, as are the semifinals and final of England's second-tier league, the RFU Championship.

In basketball, the two top European club competitions, the Euroleague and Eurocup, both use two-legged ties in the qualifying rounds that determine the clubs advancing to each competition's group phase. The Eurocup also uses two-legged ties in its quarterfinal round, which will be a separate phase of the competition starting in 2009–10. The French Pro A league used two-legged ties in all of its playoff rounds, except for the one-off final, until the 2006–07 season. At that time, all of its playoff rounds leading up to the final, which remained a single match through 2011–12, were changed to best-of-three series. The final changed to best-of-five starting in 2012–13.

Other the seasons, Gaelic football, two-legged finals were used for five seasons of the National Football League, the last in 1988–89. The International Rules Series was also two-legged in 1998–2013 and from 2017 onward.

In Canadian football, two-legged total point series were occasionally used by the Canadian Football League and their predecessor leagues in the postseason, most recently in the 1986 playoffs.

In Arena football, the playoff semifinals (but not the Arena Bowl itself) are decided, as of the 2018 season, by a two-legged total points playoff. In one 2018 semifinal, the first game ended in a tie, and went to overtime. However, the winner of the second game won by a larger margin (within regulation time) and was awarded overall victory based on total aggregate points.

Outside of sports, the American game shows Jeopardy!, Wheel of Fortune, and The Challengers have used the two-legged tie in the final round of tournament play at some point in their history.

Tiebreaking
If the aggregate score is tied after the two legs, various methods can be used to break ties. Under the away goals rule, the team who scored more away goals advances. If away goals are equal, or are not considered, then the tie may be decided by extra time and/or a penalty shootout. Replays, at the second-leg venue or a neutral venue, were formerly used in European club competitions. In the Liguilla (playoffs) of the Primera División de México, the team with the better regular-season record advances; some leagues take the two teams' record against one another into account. In the promotion playoffs in Italy's Serie B (which do not necessarily occur in a given season), two-legged ties that are level on aggregate at the end of regulation time of the second leg go to extra time (away goals are not used); if the tie remains level after extra time, the team that finished higher in the league table advances.

Second leg home advantage
Each team hosts one match, and there is no intended advantage to whether a team plays at home first or second. However, many managers and players believe that the team playing at home for the second leg has a slight advantage. The thinking is that the team playing away for the first leg can play it safe there (a draw or even a slight defeat is considered a favorable result), and then "win" the tie at home in the second leg (even away goals rule). Additionally, hosting the second match also gives an advantage as the hosting team may get to play extra-time or a penalty shootout in their home stadium if a tiebreak was needed.

A statistical analysis of roughly 12,000 matches from the European club competitions between 1956 and 2007 showed that around 53% of teams playing at home in the second leg won the tie (even after allowing for the fact that team playing at home in the second leg tend to be better teams).

In the case of World Cup intercontinental playoffs, the team that plays the second leg at home has won 61% of ties.

In many competitions where two-legged ties involve seeded and unseeded teams, the seeded team are given home advantage in the second leg. For example, in the UEFA Champions League round of 16, the group winners play the second leg at home against the group runners-up. In both the UEFA Europa League and UEFA Europa Conference League knockout round play-offs, the group runners-up play the second leg at home against the higher competition's third-place team from the group stage while in the round of 16, the group winners play the second leg at home against these knockout round playoff winners.

Until the 2016 edition of the Copa do Brasil, in the first two rounds which were played as two-legged ties, if the away team won the first leg by two or more goals, they would progress straight to the next round without needing to play the second leg which they would play at home. However, the second leg would still have to be played if the home team won the first leg by two or more goals.

Alternatives
In knockout competitions, alternatives to two-legged ties include:
 * single-leg ties,
 * either where one team has home advantage, as in all rounds of the FA Cup except the semi-finals and finals. When a replay is necessary, it may be played at the home ground of the opposite team. Two-legged ties are seen as fairer, since they give neither team home advantage; conversely, in the National Football League, home advantage is a reward for being the better seed or, in the opening wild-card round, winning the division.
 * or played at a neutral venue, as in the final match of many tournaments, including the UEFA Champions League Final, the FA Cup Semi-finals and Final, and the NFL's Super Bowl. Neutral venues may be inconvenient for a team's fans to travel to, and due to this and the much higher prices for such a marquee event, a championship at a neutral site often draws a crowd of a much different nature than a crowd at a regular season contest. If the venue is picked before the teams playing are known, it is possible for the team that normally plays at the neutral venue to reach the match: an example is the 1984 European Cup Final where Liverpool F.C. played A.S. Roma at the Stadio Olimpico, Roma's home ground (despite this, Roma had been drawn as the technical away team for this match).
 * best-of-n series, where the team winning more matches wins the series. These are common in major Canadian and American sports leagues; games cannot be drawn and series are typically best of 3, 5 or 7, though 9-game series are sometimes used. Such series are typically structured with alternating home venues so that the higher-ranked team gets the extra game (if necessary).