Democrats have a lot of reasons to be optimistic about the midterm elections in November. One reason that has gotten a lot of attention is the large number of House Republicans who have decided not to seek re-election.

With the announcement that Tom Garrett, Republican of Virginia, will not seek re-election, 40 House Republicans have said they’ll retire at the end of this term. That’s much more than would typically do so by this stage, according to data compiled by Daniel Donner of Daily Kos Elections.

All retirement announcements, 2006-18

Why is that important? Incumbents are simply tougher to topple. Over the last decade or so, they have run about seven percentage points ahead of non-incumbents from the same party in similar districts.

But the exodus of House Republicans hasn’t brightened Democrats’ prospects quite as much as the total number of retirements might suggest. A relatively high number of Republicans have retired in competitive districts (defined here as districts that lean less than 10 percentage points toward Republicans or Democrats in presidential elections). But that number is not very far out of the ordinary.

Democrats, who need a net gain of 23 seats to take control of the House, have many of their own vulnerable incumbents retiring.

In competitive districts only

Retirements in the 2018 cycle

18 Democratic retirements House member 2016 Pres. Vote Elizabeth Esty Conn. 5 +4 Clinton Rick Nolan Minn. 8 +16 Trump Robert A. Brady Pa. 1 +61 Clinton Ruben Kihuen Nev. 4 +5 Clinton John Conyers Jr. Mich. 13 +61 Clinton Sander M. Levin Mich. 9 +8 Clinton Luis V. Gutiérrez Ill. 4 +69 Clinton Gene Green Tex. 29 +46 Clinton Carol Shea-Porter N.H. 1 +2 Trump Kyrsten Sinema Ariz. 9 +16 Clinton Colleen Hanabusa Hawaii 1 +33 Clinton Niki Tsongas Mass. 3 +23 Clinton John Delaney Md. 6 +16 Clinton Jacky Rosen Nev. 3 +1 Trump Jared Polis Colo. 2 +21 Clinton Beto O'Rourke Tex. 16 +41 Clinton Tim Walz Minn. 1 +15 Trump Michelle Lujan Grisham N.M. 1 +16 Clinton 40 Republican retirements House member 2016 Pres. Vote Tom Garrett Va. 5 +11 Trump Dennis A. Ross Fla. 15 +10 Trump Paul D. Ryan Wisc. 1 +10 Trump Ryan A. Costello Pa. 6 +9 Clinton Tom Rooney Fla. 17 +27 Trump Kevin Cramer N.D. 1 +36 Trump Trey Gowdy S.C. 4 +26 Trump Rodney Frelinghuysen N.J. 11 +1 Trump Patrick Meehan Pa. 7 +28 Clinton Martha E. McSally Ariz. 2 +5 Clinton Darrell Issa Calif. 49 +8 Clinton Ed Royce Calif. 39 +9 Clinton Ron DeSantis Fla. 6 +17 Trump Gregg Harper Miss. 3 +33 Trump Bill Shuster Pa. 9 +42 Trump Blake Farenthold Tex. 27 +24 Trump Joe L. Barton Tex. 6 +12 Trump Robert W. Goodlatte Va. 6 +25 Trump Ted Poe Tex. 2 +9 Trump Frank A. LoBiondo N.J. 2 +5 Trump Lamar Smith Tex. 21 +10 Trump Jeb Hensarling Tex. 5 +28 Trump Marsha Blackburn Tenn. 7 +39 Trump Dave Trott Mich. 11 +4 Trump Charlie Dent Pa. 15 +8 Trump Dave Reichert Wash. 8 +3 Clinton Lou Barletta Pa. 11 +24 Trump Todd Rokita Ind. 4 +34 Trump Diane Black Tenn. 6 +49 Trump John J. Duncan Jr. Tenn. 2 +35 Trump Luke Messer Ind. 6 +40 Trump Steve Pearce N.M. 2 +10 Trump Raúl R. Labrador Idaho 1 +38 Trump Evan H. Jenkins W.Va. 3 +49 Trump Ileana Ros-Lehtinen Fla. 27 +20 Clinton James B. Renacci Ohio 16 +17 Trump Lynn Jenkins Kans. 2 +18 Trump Sam Johnson Tex. 3 +14 Trump Kristi Noem S.D. 1 +30 Trump Jim Bridenstine Okla. 1 +29 Trump This table does not include those who have retired or resigned and have already been replaced or will be replaced before November.

The good news for Democrats is that several of the Republicans retiring from the most competitive districts were particularly strong incumbents. They are longtime, moderate incumbents with a history of running far ahead of the national party in their district. Many won re-election without any serious challenge, even when Barack Obama won their districts in 2008 or 2012.

In a strongly Democratic political environment like this one, Washington’s Dave Reichert and New Jersey’s Frank LoBiondo were arguably the two most valuable possible retirement for the Democrats. Democrats got both.

In a more competitive national environment, Florida’s Ileana Ros-Lehtinen might have been the most valuable retirement, and she is leaving, too. Pennsylvania’s Charlie Dent is another valuable retirement for Democrats. In some cases, the retirements have moved safely Republican districts all the way to tossups.

The retirement of Dave Trott in Michigan’s 11th is less useful to Democrats: He won by 13 points last time in a district that voted for Donald J. Trump. The seat was pretty competitive before, and it remains so now.

Rodney Frelinghuysen’s retirement in New Jersey is somewhere in the middle. He was vulnerable before his retirement, but most analysts still believed he had an edge after his comfortable re-election in 2016. The district is now a tossup, or even leans to the Democrats.