Eliza Collins

USA TODAY

Hillary Clinton holds just a slight advantage over Donald Trump nationally, but her lead grew tighter when third-party candidates are added into the race.

A Quinnipiac University Poll out Wednesday found that when Clinton and Trump were one-on-one in a national general election matchup, she held a 4-point lead over the billionaire, 45% to 41%.

That number tightens even more when Libertarian Party candidate Gary Johnson and Green Party candidate Jill Stein were added. When all four candidates were factored in, the former secretary of State had 40%, Trump had 38%, Johnson had 5% and Stein got 3%.

The Trump-Clinton matchup had a noticeable gender gap. Fifty-one percent of men went Republican, while 35% of men went Democratic. Meanwhile, 54% of women surveyed backed Clinton, while 30% supported Trump.

There is some good news for Bernie Sanders in the survey. The Vermont senator led Trump in a general election matchup 48% to 39%. However, with Democrats he lagged behind Clinton 53% to 39%. In the Democratic delegate race, Sanders is hundreds of delegates behind Clinton when superdelegates (party leaders and elected officials) are included.

The Quinnipiac poll of 1,561 registered U.S. voters was conducted May 24-30. The margin of error is plus or minus 2.5 points. The poll of Democrats included 678 voters and has a margin of error of plus or minus 3.8 points.