The efficiency gap is a measure devised by University of Chicago law professor Nicholas Stephanopoulos and political scientist Eric McGhee in 2014. This statistic has been used to quantitatively assess the effect of gerrymandering, the assigning of voters to electoral districts in such a way as to increase the number of districts won by one political party at the expense of another. It has been called the most scrutinized method of measuring gerrymandering. 

The heart of the computation is to add up, over all electoral districts, the wasted votes of each party's candidates. The efficiency gap is the difference between the two parties' wasted votes, divided by the total number of votes. Stephanopoulos and McGhee argued that in a non-partisan redistricting with two roughly equally popular parties, the efficiency gap would be zero, with an equal number of wasted votes from either party. An efficiency gap above 7% or below -7% can be considered gerrymandered. If the gap exceeded 7%, then Stephanopoulos and McGhee argued that this could ensure the party with fewer wasted votes would be able to control the state for the duration of the validity of the district map.

Citing in part an efficiency gap of 11.69% to 13% in favor of the Republicans, in 2016 a U.S. District Court ruled in Gill v. Whitford against the 2011 drawing of Wisconsin legislative districts. It was the first U.S. Federal court ruling to strike down a redistricting on the grounds of favoring a political party. In the 2012 election for the state legislature, Republican candidates had 48.6% of the two-party votes but won 61% of the 99 districts. The court found that the disparate treatment of Democratic and Republican voters violated the 1st and 14th amendments to the US Constitution. The State appealed the district court's Gill v. Whitford ruling to the Supreme Court, which said that the plaintiffs did not have standing and sent the case back to the district court.  Consequently, existing gerrymandered district maps were used in the 2018 elections.  For the State Assembly, 54% of the popular vote supported Democratic candidates, but the Republicans retained their 63-seat majority.  The efficiency gap, estimated to be 10% in 2014, increased to 15% based on election results. The efficiency gap can be represented as a seat advantage, for example the two US states with highest efficiency seat advantage of 3 seats are North Carolina and Pennsylvania, Rhode Island has one of the highest efficiency gaps, Florida has one of the highest negative efficiency gaps.

Related to the efficiency gap is the wasted vote, which applies in case of proportional representation. The electoral threshold in all proportional representations causes wasted votes, with notable cases reaching double-digits, including two cases over 45%. This waste is calculated by adding the percentage votes of party lists below the electoral threshold, often set at around 5%.

Sample calculation 
The following example illustrates the efficiency gap calculation. There are two parties, A and B. According to the original paper, wasted votes for the winner (say A) are those "beyond the 50 per-cent threshold needed" i.e., beyond 50% plus one or A-((A+B)/2+1) or more simply (A-B)/2-1, if A-B is even, like here, otherwise use int((A-B)/2). There are 500 voters divided into 5 districts with 100 voters each. In the recent election, Party A had about 45% of the votes but won 4 of the 5 districts, as follows: 

The efficiency gap is the difference in the two party's wasted votes, divided by the total number of votes.
 All votes for a losing candidate are wasted .
 To win a district, 51 votes are needed, so the excess votes for the winner are wasted votes. 
Efficiency gap =  in favor of Party A.

Party A has less than half the votes, but far more of Party B's votes are wasted.

Shortcomings 

The Efficiency Gap (EG) measure has been shown to have a number of shortcomings.
Under certain assumptions, for each seat it reduces to a simple measure of the relationship between the statewide vote lean minus half the seat lean, leading to certain counterintuitive or undesirable properties. Mira Bernstein and Moon Duchin argue that this shows EG, powerful as it can be, is insufficient, by itself, for guaranteeing lack of gerrymandering, which guarantee, if it exists, requires additional measures, like compactness measure of a shape. Bernstein and Duchin conclude:

Note, normalizing EG to a particular proportional split in the population may correct this. One possible Corrected EG (CEG) is (1±EG)/(1+IEG) - 1, where IEG is EG for the ideally proportioned case, as above. The sign used with EG depends on whether the wasted votes favor the majority party(+) or not(-). CEG = 0% for the ideally proportioned case, and CEG = 0.9/1.1 - 1 = -18.18% for the reverse case of the above, 10% EG against the majority party. North Carolina is a gerrymandered state with previously 3 Democrats registered for every 2 Republicans (~60/40 as above) but elects only 3 Democrat vs 10 Republican Congressmen. The NC CEG for 2016 is (1-0.1928)/1.1 - 1 = -26.62%, and for 2018 is (1-0.2746)/1.1 - 1 = -34.05%. EGs here are negative for the majority party wasted vote disadvantage. Reject a hypothesis of no gerrymander if |CEG| > something like 10%.

The Efficiency Gap calculation can also produce findings of unfairness which go in the opposite direction of proportionality.  For instance, Efficiency Gap calculations indicate that New York State's mid-2010s Congressional map was biased in favor of the Republican Party, even though at that time Democratic voteshare ranged from 55% to 67% but seatshare was larger in every election.

See also

 Gerrymandering
 Evaluative Proportional Representation

References

Sources
 

Voting theory
Psephology