How do delegate counts get rounded?

So, I was looking at the percentage of votes and the delegates earned in three of the states so far in this election cycle. I'll use the democrats as an example, since there are fewer to compare.

``````Iowa (44 delegates):
vote %    precise    awarded
Clinton    49.6%     21.956     23
Sanders    49.4%     21.824     21

New Hampshire (24 delegates):
vote %    precise    awarded
Clinton    38.0%      9.120     9
Sanders    60.4%     14.496     15

vote %    precise    awarded
Clinton    52.6%     18.410     19
Sanders    47.3%     16.555     15
``````

So what precise formula leads to these being the number of delegates awarded?

A few things that I would expect an answer to explain are:

• Is the delegate count specifically altered in the winning candidates favor if the rounding leads to a tie?
• Is the winners delegate count always rounded up, even if their precise delegate count calculation comes out to X.01?

(p.s. I tried to make a new tag for `delegates`, but it would not let me because I do not have 150 rep on this site currently.)

Iowa does not award delegates based on the caucus results. They have a separate state convention that awards delegates to the national convention. The caucus appoints the delegates to the county conventions who appoint delegates to the state convention. You should not expect the Iowa results to work proportionally. The process by which they estimate the eventual delegate rewards is somewhat arcane. That's as far as I've been able to get in my reading on Iowa. They don't publish the details of how it works.

In New Hampshire, I believe that they reward delegates by normalizing the percentages to add to 100%. So

``````New Hampshire (24 delegates):
vote %    normalized precise    awarded
Clinton    38.0%     38.6%       9.268     9
Sanders    60.4%     61.4%      14.732     15
``````

I calculated the numbers by dividing 38% by 98.4% (the sum of the two). Note that they probably used the raw numbers instead.

I've also seen a claim that New Hampshire awards delegates to candidates with 10% or more of the vote other than the winning candidate proportionally and then all the rest to the winner. If that were true, then Sanders would have gotten 15 because only 9 delegates went to Clinton and none to other candidates. That is not consistent with how the Republican delegates were counted, but it may be correct for Democrats. It's not obvious from the data nor are detailed rules posted.

Nevada has the same problem as Iowa. The caucus elects delegates to county conventions who will elect delegates to a state convention which elects the national delegates. The current numbers are therefore estimates. The difference between the percentage of the vote and the delegate percentages probably means that Clinton's county convention delegates are allocated better. But you'd have to look through the county results to get a better idea of that. And I'm not sure how many details are published.