Taking a hand (14 mahjong tiles) and figuring out the number of tiles you have to replace to have a winning hand.
This doesn't take account for the value, but just that a hand is in a winning state.
Tenpai is determined if a hand has a Shanten of 1.
When a hand has 7 unique* duplicates, it is a winning hand. This is the worst possible Shanten you can shoot for in Mahjong.
* Some rules allow a Quad (4 of a kind) to count as two pairs.
- Can't have more than 7 pairs.
- After removing pairs from your hand count, you can take half of the remainder as your Shanten.
- Set (3 of a kind)
- Quad (4 of a kind)
- Run (A sequence of 3 tiles that are in the same suit)
- Can't have more than 4 melds.
- Removing a meld from your hand, only counts as 3 tiles towards Shanten.
A wait is an incomplete meld, that needs at least 1 tile to become a meld.
A pair wait is when you have a single tile that just needs to be pair to progress your hand (Cases of where you have no pairs, or are going for Chiitoitsu).
- If you have 12 pair waits and a pair that are all Ends (Terminals and Honors) then you have a winning hand (Thirteen Orphans).
- Every wait other than a pair wait will remove 2 tiles from your hand when calculating Shanten, up to 4 minus every meld.
- You may only remove only a single pair wait when you are calculating Shanten.