Poker Hand Ranking Calculator
AS KS QS JS 10S is a royal flush, the top category with a strength of 10. Enter five cards to name the hand, from high card upward, and get the tie-break order for comparing two hands of the same kind, with no odds involved. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Cards
- AS, KS, QS, JS, 10S
- Category
- royal_flush
- Rank value
- 10
- Tiebreak ranks
- 14
This poker hand ranking calculator evaluates exactly five standard playing cards and identifies the strongest category they form. Enter ranks from 2 through 10 or J, Q, K, and A, followed by C, D, H, or S for the suit. The result includes a numeric strength and tie-break ranks, making it useful for quick checks, teaching tools, game logic, and automated tests. Invalid cards, repeated cards, and hands with anything other than five cards are rejected clearly.
Enter a complete five-card hand
Provide exactly five cards, with every card written as a rank followed immediately by its suit. Valid ranks are 2 through 10, J, Q, K, and A. Valid suits are C for clubs, D for diamonds, H for hearts, and S for spades.
Inputs are case-insensitive, so as, AS, and As describe the same ace of spades and are normalized to AS in the result. The calculator trims surrounding whitespace but does not accept decorative suit symbols, words such as ace, or reversed forms such as SA. Every physical card must be unique.
The five-card requirement is deliberate because standard hand categories can be determined directly only after the complete hand is known. Community cards, wild cards, jokers, and choosing the best five from a larger set are outside this calculator's scope. This strict contract keeps results predictable for people and software integrations alike.
Understand the category and strength
The evaluator applies the familiar five-card hierarchy from weakest to strongest: high card, one pair, two pair, three of a kind, straight, flush, full house, four of a kind, straight flush, and royal flush. A royal flush is reported separately as the ace-high form of a straight flush. A flush requires all five suits to match, while a straight requires five distinct consecutive ranks.
An ace normally ranks above a king, but A-2-3-4-5 is recognized as the five-high straight, sometimes called the wheel. Ace does not wrap in any other sequence: Q-K-A-2-3 is not a straight. These rules are deterministic and do not depend on poker variants, betting rounds, player position, or suit precedence.
Use tie-break ranks correctly
Higher numbers win when corresponding entries are compared from left to right. For one pair, the pair rank comes first, followed by the three remaining kickers from highest to lowest. Two pair lists the higher pair, the lower pair, then the kicker.
Three and four of a kind place the repeated rank first. A full house lists its triplet before its pair. Straights and straight flushes need only their highest effective rank, with five used for A-2-3-4-5.
Flushes and high-card hands list all five ranks in descending order. Suits never appear in tie breakers because standard poker does not use clubs, diamonds, hearts, or spades to make one otherwise equal hand stronger. This compact comparison key is useful when building a game, validating a hand-history parser, preparing exercises, or testing another evaluator.
What you can do with it
Verify a showdown result
Check the category and ordered tie breakers for a disputed or unfamiliar five-card showdown.
Build poker game logic
Use the stable numeric strength and tie-break array as deterministic inputs for comparing hands in an application.
Create lessons and tests
Generate clear category feedback for poker exercises or regression-test another hand evaluator against known examples.
FAQ
What card notation should I use?
Write the rank followed by C, D, H, or S, such as 2C, QD, 10H, or AS. Letter case does not matter.
Does the calculator recognize an ace-low straight?
Yes. A-2-3-4-5 is a straight with five as its effective high rank. Ace cannot wrap in other sequences.
Are suits used to break ties?
No. Standard poker hand comparison does not rank one suit above another. Equal category and tie-break ranks remain equal.
Can I submit seven cards and get the best five-card hand?
No. This capability evaluates exactly five cards and rejects any other count rather than silently choosing a subset.
What happens if a card is repeated or malformed?
All five cards must be valid, normalized to distinct cards, and drawn from a standard 52-card deck.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/game/poker-hand-rank \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"cards":["AS","KS","QS","JS","10S"]}'const res = await fetch("https://api.kit.forhosting.com/game/poker-hand-rank", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"cards": [
"AS",
"KS",
"QS",
"JS",
"10S"
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/game/poker-hand-rank",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"cards": [
"AS",
"KS",
"QS",
"JS",
"10S"
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/game/poker-hand-rank", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"cards":["AS","KS","QS","JS","10S"]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"cards":["AS","KS","QS","JS","10S"]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/game/poker-hand-rank", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"cards": [
"AS",
"KS",
"QS",
"JS",
"10S"
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "game.poker_hand_rank",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Enter a complete five-card hand
If AS appears twice, changing capitalization does not make the second copy distinct, and the request returns an invalid-input error.
Understand the category and strength
The category field uses stable machine-friendly names such as one_pair and full_house. The rank_value field assigns 1 to high card and rises to 10 for royal flush, so applications can sort different categories without parsing prose.
Use tie-break ranks correctly
The tiebreak_ranks array records the standard comparison order inside the detected category. Compare rank_value first and consult tiebreak_ranks only when categories match.