*** Welcome to piglix ***

Poker hands


In poker, players construct sets of five playing cards, called hands, according to the rules of the game being played. Each hand has a rank, which is compared against the ranks of other hands participating in the showdown to determine who wins the pot. In high games, like Texas hold 'em and seven-card stud, the highest-ranking hands win. In low games, like razz, the lowest-ranking hands win. In high-low split games, both the highest-ranking and lowest-ranking hands win, though different rules are used to rank the high and low hands.

Each hand falls into a hand-ranking category determined by the patterns formed by its cards. Hands in a higher-ranking category always rank higher than hands in a lower-ranking category. Hands in the same category are ranked relative to each other by comparing the ranks of their respective cards. Suits are not ranked in poker, so hands in the same category that differ by suit alone are of equal rank. Cards in poker are ranked, from highest to lowest: A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3 and 2. However, aces have the lowest rank under high rules when forming part of a five-high straight or straight flush, or when playing ace-to-five low or ace-to-six low rules.

There are nine hand-ranking categories when using a standard 52-card deck, except under ace-to-five low rules where straights, flushes and straight flushes are not recognized. An additional category, five of a kind, is introduced when using one or more wild cards. The fewer hands a category contains, the higher its rank. There are 311,875,200 ways to deal five cards from the deck but only 2,598,960 distinct hands, because the order in which cards are dealt or arranged in a hand does not matter. Moreover, since hands differing only by suit are of equal rank, there are only 7,462 distinct hand ranks when using nine hand categories.


...
Wikipedia

...