This chart places all 100 senators on a grid based on how conservative or liberal they are and how their state voted for president in 2016.

Senators at the top represent states that overwhelmingly voted for Mr. Trump, while those at the bottom represent strong Clinton states. Those in the middle are from states where the presidential margin was close.

Those on the left have the most liberal voting records and those on the right have the most conservative. Those in the middle are considered the most moderate.

There are 35 seats up for election — 26 held by Democrats and just nine held by Republicans.

The races vary in competitiveness. Here are how they rate, based on an average of estimates from three organizations: Democratic Republican Solid

Likely

Lean

Tossup

Lean

Likely

Solid

Three Republicans will not be running again, leaving their seats open. A fourth, Cindy Hyde-Smith (Miss.), will run in a special election. Ms. Hyde-Smith has been appointed to fill the seat of Senator Thad Cochran when he steps down in April.

In the strongest Trump states, the seats of Democrats Joe Manchin III (W.Va.) and Heidi Heitkamp (N.D.) are both at risk. Ms. Heitkamp’s race became more competitive when Representative Kevin Cramer, the at-large congressman representing the state, entered the race.

Five Republicans and three relatively moderate Democrats hold seats in the next batch of Trump states.

One of the Republican seats, held by the retiring Bob Corker (Tenn.), was initially a long shot for Democrats but moved into reach when a former successful Democratic governor entered the race.

Joe Donnelly (Ind.) and Claire McCaskill (Mo.) are Democrats who represent states that have become more conservative in recent years. They could both face formidable Republican opponents.

Jon Tester (Mont.) is more likely to be re-elected, primarily because Republicans may not have a candidate strong enough to defeat him.

There are two Republican seats in states that Trump won fairly narrowly. Ted Cruz (Tex.) has a strong Democratic opponent in Representative Beto O’Rourke, but it would be an uphill battle to turn the Texas seat blue.

The race for the seat of departing Jeff Flake (Ariz.) is much more competitive and could hinge on how conservative the Republican nominee is. A more moderate pick may fare better against Democratic Representative Kyrsten Sinema in the general election.

There are five more Democrats running in states won — albeit narrowly — by Mr. Trump.

Bill Nelson (Fla.) is rated the most vulnerable of the group, and ratings will most likely move to a tossup if Gov. Rick Scott, a Republican who is considering a run, enters the race.

four Democrats. Tammy Baldwin (Wis.), the most liberal senator from a purple state, had the Republican groups will almost certainly target the other, the most liberal senator from a purple state, had the lowest approval rating of the group at the start of this year.

The rest of the senators are from states won by Hillary Clinton. Dean Heller (Nev.), the only Republican in this group, is expected to face Representative Jacky Rosen, a freshman Democratic congresswoman. It’s hard to see a path to a Democratic majority if Mr. Heller wins this seat.

These five Democrats represent states that Mrs. Clinton won more narrowly.

The biggest question mark of the group is Tina Smith (Minn.), who was appointed in January to replace Senator Al Franken. Her odds depend on the ability of Republicans to field a strong challenger.

Angus King (Me.), an independent who has caucused with the Democrats since he joined the Senate in 2013, is likely to keep his seat. None of the candidates who entered by the state’s filing deadline pose a serious threat.

In states where Mrs. Clinton won more easily, the fate of Robert Menendez (N.J.) is the most uncertain. He was recently tried for corruption (the trial ended in a hung jury) and is vulnerable to a primary challenge. But his seat is likely to remain blue whether or not he remains.