{"id":65473,"date":"2026-09-29T12:27:02","date_gmt":"2026-09-29T09:27:02","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=65473"},"modified":"2026-09-29T15:19:19","modified_gmt":"2026-09-29T12:19:19","slug":"permutation-and-combination-calculator","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/statistics\/permutation-and-combination-calculator\/","title":{"rendered":"Permutation and Combination Calculator"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Calculate Permutations &amp; Combinations<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"65473\" data-favorite-title=\"Permutations &amp; Combinations\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/statistics\/permutation-and-combination-calculator\/\" data-favorite-excerpt=\"Calculate permutations (nPr), combinations (nCr) and factorials instantly, with or without repetition. Enter the total number of items n, how many you choose r, and read all results at once.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-wpcalc-dice\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/statistics\/permutation-and-combination-calculator\/\" method=\"POST\" class=\"calculator\" id=\"calculator-65473\" data-post=\"65473\"><fieldset class=\"fieldset-input is-1\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field has-term\" id=\"input-1\"><label for=\"field-1\">Total number of items (n)<\/label><div class=\"term\">n<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"total_number_of_items_n\" id=\"field-1\" aria-describedby=\"calc-info-1\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" placeholder=\"e.g. 10\" min=\"0\" max=\"10000\" value=\"10\"\/><small id=\"calc-info-1\">Size of the full set. Whole number from 0 to 10,000.<\/small><\/div><div class=\"field has-term\" id=\"input-2\"><label for=\"field-2\">Number of items chosen (r)<\/label><div class=\"term\">r<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"number_of_items_chosen_r\" id=\"field-2\" aria-describedby=\"calc-info-2\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" placeholder=\"e.g. 3\" min=\"0\" max=\"10000\" value=\"3\"\/><small id=\"calc-info-2\">How many items are selected or arranged. Without repetition, r cannot exceed n.<\/small><\/div><div class=\"field\" id=\"input-3\"><label for=\"field-3\">Repetition<\/label><div class=\"grid grid-cols-1\"><select id=\"field-3\" name=\"repetition\"><option value=\"without\" selected>Without repetition (all items distinct)<\/option><option value=\"with\">With repetition (items may repeat)<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"65473\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Your Results<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>Permutations \/ Variations (nPr)<\/span><span class=\"result-term\">nPr<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-2\"><span class=\"field-title\"><span>Combinations (nCr)<\/span><span class=\"result-term\">nCr<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-3\"><span class=\"field-title\"><span>Permutations of all n items<\/span><span class=\"result-term\">n!<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-4\"><span class=\"field-title\"><span>Interpretation &amp; details<\/span><\/span><span class=\"field-value\" id=\"result-4\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"65473\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>Permutations &amp; Combinations Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[ P(n, r) = \\frac{n!}{(n - r)!} \\qquad C(n, r) = \\frac{n!}{(n - r)! \\, r!} \\qquad P(n, r) = C(n, r) \\cdot r! \\\\ \\\\ \\text{With repetition:} \\quad P_{rep}(n, r) = n^r \\qquad C_{rep}(n, r) = \\binom{n + r - 1}{r} = \\frac{(n + r - 1)!}{r! \\, (n - 1)!} \\\\ \\\\ n! = n \\cdot (n - 1) \\cdot (n - 2) \\cdots 2 \\cdot 1 \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(n\\) \u2014 total number of distinct items in the set<\/li>\n<li>\\(r\\) \u2014 number of items chosen or arranged<\/li>\n<li>\\(P(n, r)\\) \u2014 number of ordered selections (permutations, also called variations \\(V(n, r)\\), or nPr)<\/li>\n<li>\\(C(n, r)\\) \u2014 number of unordered selections (combinations, or nCr)<\/li>\n<li>\\(n!\\) \u2014 factorial of \\(n\\), the number of ways to arrange all \\(n\\) items in a row<\/li>\n<\/ul>\n<p>A permutation counts ordered arrangements: which item comes first, second, third matters. A combination counts unordered selections: only the chosen set matters. The two are linked by \\(P(n, r) = C(n, r) \\cdot r!\\), because every unordered group of \\(r\\) items can be ordered in \\(r!\\) ways. When repetition is allowed, the same item may be picked more than once, which changes both formulas.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>Permutations &amp; Combinations \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> a club with 10 members must pick a president, secretary and treasurer (three different people), and separately wants to know how many 3-person committees it could form.<\/p>\n<p>Ordered assignments (permutations):<\/p>\n<p>\\[ P(10, 3) = \\frac{10!}{(10 - 3)!} = \\frac{10!}{7!} = 10 \\cdot 9 \\cdot 8 = 720 \\]<\/p>\n<p>Unordered committees (combinations):<\/p>\n<p>\\[ C(10, 3) = \\frac{10!}{7! \\cdot 3!} = \\frac{720}{6} = 120 \\]<\/p>\n<p>Arranging all 10 members in a row:<\/p>\n<p>\\[ 10! = 3{,}628{,}800 \\]<\/p>\n<p><strong>Result:<\/strong> there are 720 ways to assign the three roles, 120 possible 3-person committees, and 3,628,800 orderings of the whole club. Note that \\(720 = 120 \\cdot 3!\\), since each committee can distribute the three roles in \\(3! = 6\\) ways.<\/p>\n<p>\n\r\n<\/section>\n<h2>How to use the calculator<\/h2>\n<ol>\n<li>Enter the <strong>Total number of items (n)<\/strong> \u2014 the size of the full set (0 to 10,000).<\/li>\n<li>Enter the <strong>Number of items chosen (r)<\/strong> \u2014 how many items you select or arrange. Without repetition, \\(r\\) cannot exceed \\(n\\); with repetition it can.<\/li>\n<li>Choose the <strong>Repetition<\/strong> mode: \"Without repetition (all items distinct)\" for drawing without replacement, or \"With repetition (items may repeat)\" for situations like dice rolls, PIN codes, or drawing with replacement.<\/li>\n<li>Read the results: <strong>Permutations \/ Variations (nPr)<\/strong>, <strong>Combinations (nCr)<\/strong>, <strong>Permutations of all n items<\/strong> (\\(n!\\)), plus an interpretation block that shows all four counts side by side.<\/li>\n<\/ol>\n<h2>Permutations, combinations and variations explained<\/h2>\n<p>Whenever you select items from a set, two questions decide which number you need. <em>Does the order matter?<\/em> And <em>can items repeat?<\/em> Crossing these two questions gives four classic counting problems, and this calculator shows all four for your inputs so you can compare them directly.<\/p>\n<p>If order matters and items cannot repeat, you are counting <strong>permutations<\/strong> \\(P(n, r)\\) \u2014 in many European textbooks these are called <strong>variations<\/strong> \\(V(n, r)\\), which is exactly the nPr button on a scientific calculator. You have \\(n\\) choices for the first position, \\(n-1\\) for the second, and so on down to \\(n-r+1\\) for the last, giving \\(n!\/(n-r)\\). If order does not matter, each unordered group was counted \\(r!\\) times, so you divide by \\(r!\\) and get the <strong>combination<\/strong> \\(C(n, r)\\). Combinations are always less than or equal to permutations for the same \\(n\\) and \\(r\\), and the gap grows quickly: for \\(n = 52, r = 5\\) there are about 311 million ordered draws but only 2,598,960 distinct poker hands.<\/p>\n<p>With <strong>repetition<\/strong>, each choice is independent of the previous ones, so the ordered count is simply \\(n^r\\): a 4-digit PIN uses \\(10^4 = 10{,}000\\) codes. The unordered count with repetition answers a subtler question \u2014 how many multisets of size \\(r\\) can be built \u2014 and equals \\(\\binom{n+r-1}{r}\\). For example, choosing 3 scoops of ice cream from 10 flavors (repeats allowed, order irrelevant) gives \\(\\binom{12}{3} = 220\\) options.<\/p>\n<p>Finally, arranging <em>all<\/em> \\(n\\) items in a sequence gives \\(n!\\) permutations \u2014 the special case \\(r = n\\). Factorial growth is extremely fast: \\(10!\\) already exceeds 3.6 million, and \\(70!\\) is larger than the number of atoms in the observable universe. For large inputs the calculator therefore displays results in scientific notation, e.g. \\(5.47 \\times 10^{157}\\).<\/p>\n<h2>Assumptions, limitations and practical tips<\/h2>\n<ul>\n<li><strong>All items are distinct.<\/strong> The formulas assume every item is distinguishable. If your set contains identical objects (e.g. the letters in a word with repeated letters), the standard permutation formula overcounts; those cases need the multinomial approach instead.<\/li>\n<li><strong>Repetition mode changes the interpretation.<\/strong> \"With repetition\" means each draw is independent (sampling with replacement). If you are modelling lottery draws, card hands, or committee selections, use \"without repetition\".<\/li>\n<li><strong>\\(r &gt; n\\) without repetition is impossible<\/strong> and the calculator will tell you so; with repetition it is perfectly valid (you can roll a die 20 times even though it has 6 faces).<\/li>\n<li><strong>Edge cases<\/strong> follow the standard conventions: \\(P(n, 0) = C(n, 0) = 1\\) (there is exactly one way to choose nothing), and \\(0! = 1\\).<\/li>\n<li><strong>Large numbers.<\/strong> Inputs up to 10,000 are supported, but results beyond roughly 15 digits are shown as a mantissa times a power of ten, since no standard number format can hold such values exactly.<\/li>\n<li><strong>Choosing the right count.<\/strong> Ask yourself: \"If I swapped two chosen items, would the outcome be different?\" If yes, use permutations; if no, use combinations. And ask: \"Could I pick the same item twice?\" If yes, use the repetition formulas.<\/li>\n<\/ul>\n<h2>Quick reference: 10 items, choose 3<\/h2>\n<table>\n<thead>\n<tr>\n<th>Count<\/th>\n<th>Formula<\/th>\n<th>Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Variations without repetition (nPr)<\/td>\n<td>\\(\\frac{n!}{(n-r)!}\\)<\/td>\n<td>720<\/td>\n<\/tr>\n<tr>\n<td>Variations with repetition<\/td>\n<td>\\(n^r\\)<\/td>\n<td>1,000<\/td>\n<\/tr>\n<tr>\n<td>Combinations without repetition (nCr)<\/td>\n<td>\\(\\frac{n!}{(n-r)!\\,r!}\\)<\/td>\n<td>120<\/td>\n<\/tr>\n<tr>\n<td>Combinations with repetition<\/td>\n<td>\\(\\binom{n+r-1}{r}\\)<\/td>\n<td>220<\/td>\n<\/tr>\n<tr>\n<td>Permutations of all items<\/td>\n<td>\\(n!\\)<\/td>\n<td>3,628,800<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This table, which mirrors the calculator's interpretation block for \\(n = 10\\), \\(r = 3\\), shows how strongly the answer depends on whether order matters and whether repeats are allowed \u2014 the same pair of inputs yields answers ranging from 120 to 1,000.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Calculate permutations (nPr), combinations (nCr) and factorials instantly, with or without repetition. Enter the total number of items n, how many you choose r, and read all results at once.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[74],"tags":[76],"class_list":["post-65473","post","type-post","status-publish","format-standard","hentry","category-statistics","tag-probability"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=65473"}],"version-history":[{"count":3,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65473\/revisions"}],"predecessor-version":[{"id":65712,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65473\/revisions\/65712"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=65473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=65473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=65473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}