General rules of all poker hands

The following rules apply to the ranking of all poker hands. Under typical rules there are 7,462 distinct ranks. A hand always consists of five cards. In games where more than five cards are available to each player, the best five-card combination of those cards must be played. Any cards not included in the hand do not affect its ranking. For example, if player A holds 3♠ Q♦ and player B holds 3♣ A♣, and five cards 4♣ 5♦ 6♦ 7♠ 10♥ are available to both players, the players hold equally ranking 3-4-5-6-7 straights despite the fact that the player B's ace ranks higher than the player A's queen.
Individual cards are ranked A (highest), K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2 (lowest). Aces can appear low when part of an A-2-3-4-5 straight or straight flush. In the poker variants ace-to-five and ace-to-six lowball, the ace only plays low, and only plays high in deuce-to-seven lowball. Individual card ranks are used to rank hands that are in the same rank category.
The suits of the cards are used to determine whether a hand forms a flush or straight flush. In most variants, suits do not have an associated value, and play no part in determining the ranking of a hand. Sometimes a ranking called high card by suit is used for randomly selecting a player to deal. Low card by suit usually determines the bring-in better in stud games.
Hands are ranked first by category, then by individual card ranks; even the lowest hand that qualifies in a certain category defeats all hands in all lower categories. For example, 2♦ 2♠ 3♦ 3♣ 4♠, the lowest-valued two pair hand, defeats all hands with just one pair or high card (such as A♠ A♦ K♦ Q♥ J♣). Only between two hands in the same category are card ranks used to break ties.
A poker hand has the same hand ranking regardless of the order in which it is arranged by the deal, by a description, or by a picture. So a hand arranged as 10♠ 8♦ 10♦ 6♣ 10♣ is ranked the same as 10♣ 10♦ 10♠ 8♦ 6♣ even though in the first hand the three of a kind is not immediately obvious.
If there are multiple hands of the same rank at the showdown, the pot is divided equally between the winning players. If the divided number creates fractions (odd chip), the first hand clockwise from the button gets the chip.
There are 311 875 200 ways (5-permutations) of being dealt five cards from a 52-card deck, but since the order of cards does not matter, there are 5! = 120 5-permutations giving any one hand, so there are only  {52 \choose 5} = \frac{52!}{5!(52-5)!} = \frac{52!}{5!47!} = \frac {52 \times 51 \times 50 \times 49 \times 48} { 5!} = 2{,}598{,}960 possible distinct hands.