What if there is no majority in a state? How do the electoral votes work out?

With the exceptions of Maine and Nebraska, who can split their votes. What would happen if in the presidential election, no candidate had a majority? An independent could get enough votes to prevent either the D or R candidate from the 50%+1 they need in a close race.

This has happened pretty frequently, I believe, and the electoral votes go to whoever gets the largest portion of the vote.

The term the OP wants is plurality voting. A candidate with a plurality has the largest number of votes, whether or not it is a majority of all votes.

See, for example, the 1992 election between Clinton, Bush, and Perot. From a quick glance at the state data, I only see one state where anybody got a majority, and that was Arkansas for Clinton. In every other state and DC, none of the candidates got at least 50%+1. Also, remember the big hubbub in 2000 with Florida’s results? Nobody get 50%+1 there, either. All the electors went to who had the plurality of the popular vote, which ended up being Bush, with 48.84% of the vote.

every state awards the plurality winner the electoral votes.

Not every state.

To be pedantic majority =/= 50% + 1 if there are an odd number of voters.

Ok, at least the integer value of 50%+1.