Permutation Calculator (nPr)

Your values

Arrangement type

Each item is used at most once, like runners on a podium.

Up to 10,000

How many you arrange

Separate names with commas to list the results with them. Typing names updates n.

Order matters: A then B is a different arrangement from B then A.

Result

Permutations P(10, 3)

Number of digits
3
Chance of one specific arrangement
1 in 720

Step by step

  1. Permutations without repetition:
    P(n,r)=n!(n−r)!P(n,r)=\frac{n!}{(n-r)!}
  2. Substitute the values:
    P(10,3)=10!(10−3)!=10!7!P(10,3)=\frac{10!}{(10-3)!}=\frac{10!}{7!}
  3. Cancel the factorials, leaving r factors counting down from n:
    P(10,3)=10⋅9⋅8=720P(10,3)=10\cdot9\cdot8=720
List all 720
  1. 1. ABC
  2. 2. ABD
  3. 3. ABE
  4. 4. ABF
  5. 5. ABG
  6. 6. ABH
  7. 7. ABI
  8. 8. ABJ
  9. 9. ACB
  10. 10. ACD
  11. 11. ACE
  12. 12. ACF
  13. 13. ACG
  14. 14. ACH
  15. 15. ACI
  16. 16. ACJ
  17. 17. ADB
  18. 18. ADC
  19. 19. ADE
  20. 20. ADF
  21. 21. ADG
  22. 22. ADH
  23. 23. ADI
  24. 24. ADJ
  25. 25. AEB
  26. 26. AEC
  27. 27. AED
  28. 28. AEF
  29. 29. AEG
  30. 30. AEH
  31. 31. AEI
  32. 32. AEJ
  33. 33. AFB
  34. 34. AFC
  35. 35. AFD
  36. 36. AFE
  37. 37. AFG
  38. 38. AFH
  39. 39. AFI
  40. 40. AFJ
  41. 41. AGB
  42. 42. AGC
  43. 43. AGD
  44. 44. AGE
  45. 45. AGF
  46. 46. AGH
  47. 47. AGI
  48. 48. AGJ
  49. 49. AHB
  50. 50. AHC
  51. 51. AHD
  52. 52. AHE
  53. 53. AHF
  54. 54. AHG
  55. 55. AHI
  56. 56. AHJ
  57. 57. AIB
  58. 58. AIC
  59. 59. AID
  60. 60. AIE
  61. 61. AIF
  62. 62. AIG
  63. 63. AIH
  64. 64. AIJ
  65. 65. AJB
  66. 66. AJC
  67. 67. AJD
  68. 68. AJE
  69. 69. AJF
  70. 70. AJG
  71. 71. AJH
  72. 72. AJI
  73. 73. BAC
  74. 74. BAD
  75. 75. BAE
  76. 76. BAF
  77. 77. BAG
  78. 78. BAH
  79. 79. BAI
  80. 80. BAJ
  81. 81. BCA
  82. 82. BCD
  83. 83. BCE
  84. 84. BCF
  85. 85. BCG
  86. 86. BCH
  87. 87. BCI
  88. 88. BCJ
  89. 89. BDA
  90. 90. BDC
  91. 91. BDE
  92. 92. BDF
  93. 93. BDG
  94. 94. BDH
  95. 95. BDI
  96. 96. BDJ
  97. 97. BEA
  98. 98. BEC
  99. 99. BED
  100. 100. BEF
  101. 101. BEG
  102. 102. BEH
  103. 103. BEI
  104. 104. BEJ
  105. 105. BFA
  106. 106. BFC
  107. 107. BFD
  108. 108. BFE
  109. 109. BFG
  110. 110. BFH
  111. 111. BFI
  112. 112. BFJ
  113. 113. BGA
  114. 114. BGC
  115. 115. BGD
  116. 116. BGE
  117. 117. BGF
  118. 118. BGH
  119. 119. BGI
  120. 120. BGJ
  121. 121. BHA
  122. 122. BHC
  123. 123. BHD
  124. 124. BHE
  125. 125. BHF
  126. 126. BHG
  127. 127. BHI
  128. 128. BHJ
  129. 129. BIA
  130. 130. BIC
  131. 131. BID
  132. 132. BIE
  133. 133. BIF
  134. 134. BIG
  135. 135. BIH
  136. 136. BIJ
  137. 137. BJA
  138. 138. BJC
  139. 139. BJD
  140. 140. BJE
  141. 141. BJF
  142. 142. BJG
  143. 143. BJH
  144. 144. BJI
  145. 145. CAB
  146. 146. CAD
  147. 147. CAE
  148. 148. CAF
  149. 149. CAG
  150. 150. CAH
  151. 151. CAI
  152. 152. CAJ
  153. 153. CBA
  154. 154. CBD
  155. 155. CBE
  156. 156. CBF
  157. 157. CBG
  158. 158. CBH
  159. 159. CBI
  160. 160. CBJ
  161. 161. CDA
  162. 162. CDB
  163. 163. CDE
  164. 164. CDF
  165. 165. CDG
  166. 166. CDH
  167. 167. CDI
  168. 168. CDJ
  169. 169. CEA
  170. 170. CEB
  171. 171. CED
  172. 172. CEF
  173. 173. CEG
  174. 174. CEH
  175. 175. CEI
  176. 176. CEJ
  177. 177. CFA
  178. 178. CFB
  179. 179. CFD
  180. 180. CFE
  181. 181. CFG
  182. 182. CFH
  183. 183. CFI
  184. 184. CFJ
  185. 185. CGA
  186. 186. CGB
  187. 187. CGD
  188. 188. CGE
  189. 189. CGF
  190. 190. CGH
  191. 191. CGI
  192. 192. CGJ
  193. 193. CHA
  194. 194. CHB
  195. 195. CHD
  196. 196. CHE
  197. 197. CHF
  198. 198. CHG
  199. 199. CHI
  200. 200. CHJ
  201. 201. CIA
  202. 202. CIB
  203. 203. CID
  204. 204. CIE
  205. 205. CIF
  206. 206. CIG
  207. 207. CIH
  208. 208. CIJ
  209. 209. CJA
  210. 210. CJB
  211. 211. CJD
  212. 212. CJE
  213. 213. CJF
  214. 214. CJG
  215. 215. CJH
  216. 216. CJI
  217. 217. DAB
  218. 218. DAC
  219. 219. DAE
  220. 220. DAF
  221. 221. DAG
  222. 222. DAH
  223. 223. DAI
  224. 224. DAJ
  225. 225. DBA
  226. 226. DBC
  227. 227. DBE
  228. 228. DBF
  229. 229. DBG
  230. 230. DBH
  231. 231. DBI
  232. 232. DBJ
  233. 233. DCA
  234. 234. DCB
  235. 235. DCE
  236. 236. DCF
  237. 237. DCG
  238. 238. DCH
  239. 239. DCI
  240. 240. DCJ
  241. 241. DEA
  242. 242. DEB
  243. 243. DEC
  244. 244. DEF
  245. 245. DEG
  246. 246. DEH
  247. 247. DEI
  248. 248. DEJ
  249. 249. DFA
  250. 250. DFB
  251. 251. DFC
  252. 252. DFE
  253. 253. DFG
  254. 254. DFH
  255. 255. DFI
  256. 256. DFJ
  257. 257. DGA
  258. 258. DGB
  259. 259. DGC
  260. 260. DGE
  261. 261. DGF
  262. 262. DGH
  263. 263. DGI
  264. 264. DGJ
  265. 265. DHA
  266. 266. DHB
  267. 267. DHC
  268. 268. DHE
  269. 269. DHF
  270. 270. DHG
  271. 271. DHI
  272. 272. DHJ
  273. 273. DIA
  274. 274. DIB
  275. 275. DIC
  276. 276. DIE
  277. 277. DIF
  278. 278. DIG
  279. 279. DIH
  280. 280. DIJ
  281. 281. DJA
  282. 282. DJB
  283. 283. DJC
  284. 284. DJE
  285. 285. DJF
  286. 286. DJG
  287. 287. DJH
  288. 288. DJI
  289. 289. EAB
  290. 290. EAC
  291. 291. EAD
  292. 292. EAF
  293. 293. EAG
  294. 294. EAH
  295. 295. EAI
  296. 296. EAJ
  297. 297. EBA
  298. 298. EBC
  299. 299. EBD
  300. 300. EBF
  301. 301. EBG
  302. 302. EBH
  303. 303. EBI
  304. 304. EBJ
  305. 305. ECA
  306. 306. ECB
  307. 307. ECD
  308. 308. ECF
  309. 309. ECG
  310. 310. ECH
  311. 311. ECI
  312. 312. ECJ
  313. 313. EDA
  314. 314. EDB
  315. 315. EDC
  316. 316. EDF
  317. 317. EDG
  318. 318. EDH
  319. 319. EDI
  320. 320. EDJ
  321. 321. EFA
  322. 322. EFB
  323. 323. EFC
  324. 324. EFD
  325. 325. EFG
  326. 326. EFH
  327. 327. EFI
  328. 328. EFJ
  329. 329. EGA
  330. 330. EGB
  331. 331. EGC
  332. 332. EGD
  333. 333. EGF
  334. 334. EGH
  335. 335. EGI
  336. 336. EGJ
  337. 337. EHA
  338. 338. EHB
  339. 339. EHC
  340. 340. EHD
  341. 341. EHF
  342. 342. EHG
  343. 343. EHI
  344. 344. EHJ
  345. 345. EIA
  346. 346. EIB
  347. 347. EIC
  348. 348. EID
  349. 349. EIF
  350. 350. EIG
  351. 351. EIH
  352. 352. EIJ
  353. 353. EJA
  354. 354. EJB
  355. 355. EJC
  356. 356. EJD
  357. 357. EJF
  358. 358. EJG
  359. 359. EJH
  360. 360. EJI
  361. 361. FAB
  362. 362. FAC
  363. 363. FAD
  364. 364. FAE
  365. 365. FAG
  366. 366. FAH
  367. 367. FAI
  368. 368. FAJ
  369. 369. FBA
  370. 370. FBC
  371. 371. FBD
  372. 372. FBE
  373. 373. FBG
  374. 374. FBH
  375. 375. FBI
  376. 376. FBJ
  377. 377. FCA
  378. 378. FCB
  379. 379. FCD
  380. 380. FCE
  381. 381. FCG
  382. 382. FCH
  383. 383. FCI
  384. 384. FCJ
  385. 385. FDA
  386. 386. FDB
  387. 387. FDC
  388. 388. FDE
  389. 389. FDG
  390. 390. FDH
  391. 391. FDI
  392. 392. FDJ
  393. 393. FEA
  394. 394. FEB
  395. 395. FEC
  396. 396. FED
  397. 397. FEG
  398. 398. FEH
  399. 399. FEI
  400. 400. FEJ
  401. 401. FGA
  402. 402. FGB
  403. 403. FGC
  404. 404. FGD
  405. 405. FGE
  406. 406. FGH
  407. 407. FGI
  408. 408. FGJ
  409. 409. FHA
  410. 410. FHB
  411. 411. FHC
  412. 412. FHD
  413. 413. FHE
  414. 414. FHG
  415. 415. FHI
  416. 416. FHJ
  417. 417. FIA
  418. 418. FIB
  419. 419. FIC
  420. 420. FID
  421. 421. FIE
  422. 422. FIG
  423. 423. FIH
  424. 424. FIJ
  425. 425. FJA
  426. 426. FJB
  427. 427. FJC
  428. 428. FJD
  429. 429. FJE
  430. 430. FJG
  431. 431. FJH
  432. 432. FJI
  433. 433. GAB
  434. 434. GAC
  435. 435. GAD
  436. 436. GAE
  437. 437. GAF
  438. 438. GAH
  439. 439. GAI
  440. 440. GAJ
  441. 441. GBA
  442. 442. GBC
  443. 443. GBD
  444. 444. GBE
  445. 445. GBF
  446. 446. GBH
  447. 447. GBI
  448. 448. GBJ
  449. 449. GCA
  450. 450. GCB
  451. 451. GCD
  452. 452. GCE
  453. 453. GCF
  454. 454. GCH
  455. 455. GCI
  456. 456. GCJ
  457. 457. GDA
  458. 458. GDB
  459. 459. GDC
  460. 460. GDE
  461. 461. GDF
  462. 462. GDH
  463. 463. GDI
  464. 464. GDJ
  465. 465. GEA
  466. 466. GEB
  467. 467. GEC
  468. 468. GED
  469. 469. GEF
  470. 470. GEH
  471. 471. GEI
  472. 472. GEJ
  473. 473. GFA
  474. 474. GFB
  475. 475. GFC
  476. 476. GFD
  477. 477. GFE
  478. 478. GFH
  479. 479. GFI
  480. 480. GFJ
  481. 481. GHA
  482. 482. GHB
  483. 483. GHC
  484. 484. GHD
  485. 485. GHE
  486. 486. GHF
  487. 487. GHI
  488. 488. GHJ
  489. 489. GIA
  490. 490. GIB
  491. 491. GIC
  492. 492. GID
  493. 493. GIE
  494. 494. GIF
  495. 495. GIH
  496. 496. GIJ
  497. 497. GJA
  498. 498. GJB
  499. 499. GJC
  500. 500. GJD
  501. 501. GJE
  502. 502. GJF
  503. 503. GJH
  504. 504. GJI
  505. 505. HAB
  506. 506. HAC
  507. 507. HAD
  508. 508. HAE
  509. 509. HAF
  510. 510. HAG
  511. 511. HAI
  512. 512. HAJ
  513. 513. HBA
  514. 514. HBC
  515. 515. HBD
  516. 516. HBE
  517. 517. HBF
  518. 518. HBG
  519. 519. HBI
  520. 520. HBJ
  521. 521. HCA
  522. 522. HCB
  523. 523. HCD
  524. 524. HCE
  525. 525. HCF
  526. 526. HCG
  527. 527. HCI
  528. 528. HCJ
  529. 529. HDA
  530. 530. HDB
  531. 531. HDC
  532. 532. HDE
  533. 533. HDF
  534. 534. HDG
  535. 535. HDI
  536. 536. HDJ
  537. 537. HEA
  538. 538. HEB
  539. 539. HEC
  540. 540. HED
  541. 541. HEF
  542. 542. HEG
  543. 543. HEI
  544. 544. HEJ
  545. 545. HFA
  546. 546. HFB
  547. 547. HFC
  548. 548. HFD
  549. 549. HFE
  550. 550. HFG
  551. 551. HFI
  552. 552. HFJ
  553. 553. HGA
  554. 554. HGB
  555. 555. HGC
  556. 556. HGD
  557. 557. HGE
  558. 558. HGF
  559. 559. HGI
  560. 560. HGJ
  561. 561. HIA
  562. 562. HIB
  563. 563. HIC
  564. 564. HID
  565. 565. HIE
  566. 566. HIF
  567. 567. HIG
  568. 568. HIJ
  569. 569. HJA
  570. 570. HJB
  571. 571. HJC
  572. 572. HJD
  573. 573. HJE
  574. 574. HJF
  575. 575. HJG
  576. 576. HJI
  577. 577. IAB
  578. 578. IAC
  579. 579. IAD
  580. 580. IAE
  581. 581. IAF
  582. 582. IAG
  583. 583. IAH
  584. 584. IAJ
  585. 585. IBA
  586. 586. IBC
  587. 587. IBD
  588. 588. IBE
  589. 589. IBF
  590. 590. IBG
  591. 591. IBH
  592. 592. IBJ
  593. 593. ICA
  594. 594. ICB
  595. 595. ICD
  596. 596. ICE
  597. 597. ICF
  598. 598. ICG
  599. 599. ICH
  600. 600. ICJ
  601. 601. IDA
  602. 602. IDB
  603. 603. IDC
  604. 604. IDE
  605. 605. IDF
  606. 606. IDG
  607. 607. IDH
  608. 608. IDJ
  609. 609. IEA
  610. 610. IEB
  611. 611. IEC
  612. 612. IED
  613. 613. IEF
  614. 614. IEG
  615. 615. IEH
  616. 616. IEJ
  617. 617. IFA
  618. 618. IFB
  619. 619. IFC
  620. 620. IFD
  621. 621. IFE
  622. 622. IFG
  623. 623. IFH
  624. 624. IFJ
  625. 625. IGA
  626. 626. IGB
  627. 627. IGC
  628. 628. IGD
  629. 629. IGE
  630. 630. IGF
  631. 631. IGH
  632. 632. IGJ
  633. 633. IHA
  634. 634. IHB
  635. 635. IHC
  636. 636. IHD
  637. 637. IHE
  638. 638. IHF
  639. 639. IHG
  640. 640. IHJ
  641. 641. IJA
  642. 642. IJB
  643. 643. IJC
  644. 644. IJD
  645. 645. IJE
  646. 646. IJF
  647. 647. IJG
  648. 648. IJH
  649. 649. JAB
  650. 650. JAC
  651. 651. JAD
  652. 652. JAE
  653. 653. JAF
  654. 654. JAG
  655. 655. JAH
  656. 656. JAI
  657. 657. JBA
  658. 658. JBC
  659. 659. JBD
  660. 660. JBE
  661. 661. JBF
  662. 662. JBG
  663. 663. JBH
  664. 664. JBI
  665. 665. JCA
  666. 666. JCB
  667. 667. JCD
  668. 668. JCE
  669. 669. JCF
  670. 670. JCG
  671. 671. JCH
  672. 672. JCI
  673. 673. JDA
  674. 674. JDB
  675. 675. JDC
  676. 676. JDE
  677. 677. JDF
  678. 678. JDG
  679. 679. JDH
  680. 680. JDI
  681. 681. JEA
  682. 682. JEB
  683. 683. JEC
  684. 684. JED
  685. 685. JEF
  686. 686. JEG
  687. 687. JEH
  688. 688. JEI
  689. 689. JFA
  690. 690. JFB
  691. 691. JFC
  692. 692. JFD
  693. 693. JFE
  694. 694. JFG
  695. 695. JFH
  696. 696. JFI
  697. 697. JGA
  698. 698. JGB
  699. 699. JGC
  700. 700. JGD
  701. 701. JGE
  702. 702. JGF
  703. 703. JGH
  704. 704. JGI
  705. 705. JHA
  706. 706. JHB
  707. 707. JHC
  708. 708. JHD
  709. 709. JHE
  710. 710. JHF
  711. 711. JHG
  712. 712. JHI
  713. 713. JIA
  714. 714. JIB
  715. 715. JIC
  716. 716. JID
  717. 717. JIE
  718. 718. JIF
  719. 719. JIG
  720. 720. JIH

About this tool

A permutation is an arrangement where order matters: race podiums, seating plans, passwords and anagrams. The number of ways to arrange r of n distinct items is written P(n, r) or nPr. This calculator also handles arrangements with repetition and arrangements of a multiset, where some items are identical. It uses exact whole-number arithmetic and shows each step.

How it works

Choose the kind of arrangement first. "Without repetition" counts ordered selections of r different items from n, such as the gold, silver and bronze finishers in a race. "With repetition" lets an item be used again, as with the digits of a PIN code. "Repeated letters" counts the distinct orderings of a word or set with identical items, such as the letters of MISSISSIPPI.

For the first two modes, enter n and r. For repeated letters, type a word (letters are counted regardless of case and spaces are ignored) or the sizes of the identical groups separated by commas. The result is exact, with a worked solution, and small sets can be listed in full.

P(n,r)=n!(n−r)!nr,n!n1! n2!⋯nk!\begin{gathered}P(n,r)=\frac{n!}{(n-r)!}\\[0.6em]n^{r},\qquad\frac{n!}{n_1!\,n_2!\cdots n_k!}\end{gathered}

Example

Ten runners can finish first, second and third in P(10,3)=10⋅9⋅8=720P(10,3)=10\cdot9\cdot8=720 ways. A 4-digit PIN, where digits may repeat, has 104=1000010^4=10000 possibilities.

The word MISSISSIPPI has 11 letters: one M, four I, four S and two P. Swapping identical letters gives the same word, so divide by their factorials: 11!1! 4! 4! 2!=399168001152=34650\frac{11!}{1!\,4!\,4!\,2!}=\frac{39916800}{1152}=34650 distinct arrangements.

Permutation table

P(n, r) for n and r up to 8

n \ r12345678
11
222
3366
44122424
552060120120
6630120360720720
77422108402,5205,0405,040
88563361,6806,72020,16040,32040,320

Each row ends with P(n,n)=n!P(n,n)=n!. Moving one column to the right multiplies by the next factor: P(n,r)=P(n,r−1)⋅(n−r+1)P(n,r)=P(n,r-1)\cdot(n-r+1).

Assumptions and limits

n and r can be any whole numbers up to 10,000, and a word or set of groups can contain up to 10,000 items in total. Without repetition, r cannot exceed n. Results are exact; huge values are summarized in scientific notation with all digits available. Arrangements are listed only when there are at most 1,000.

Frequently asked questions

What is the formula for permutations?

Without repetition, P(n,r)=n!(n−r)!P(n,r)=\frac{n!}{(n-r)!}, which is the product of the r numbers counting down from n. With repetition each of the r positions has n choices, so the count is nrn^r.

How many ways can you arrange the letters of a word?

Divide the factorial of the number of letters by the factorial of each letter's count. BANANA has 6 letters with three A and two N, so it has 6!3! 2! 1!=60\frac{6!}{3!\,2!\,1!}=60 distinct arrangements.

What is the difference between a permutation and a combination?

Permutations count ordered arrangements; combinations count unordered selections. Each combination of r items can be ordered in r!r! ways, so P(n,r)=C(n,r)⋅r!P(n,r)=C(n,r)\cdot r!.

How many 4-digit PIN codes are there?

Each of the 4 digits can be any of 10, with repeats allowed, so there are 104=1000010^4=10000 codes from 0000 to 9999. If digits could not repeat, there would be P(10,4)=5040P(10,4)=5040.

What is P(n, n)?

Arranging all n items gives P(n,n)=n!P(n,n)=n!, because 0!=10!=1. For example, 5 books can be lined up on a shelf in 5!=1205!=120 ways.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
modeArrangement typeone of: standard, repetition, multisetdefault standard
nTotal items (n)whole number; allowed 0–10000; used with mode = standard, repetitionrequired
rItems chosen (r)whole number; allowed 0–10000; used with mode = standard, repetitionrequired
itemsItem names (optional)text; used with mode = standard, repetition; your own text; Copy link includes itoptional
wordWord or group sizestext; used with mode = multiset; your own text; Copy link includes itrequired

Examples

  • ?n=8&r=3
  • ?mode=repetition&n=26&r=4
  • ?word=BANANA
  • ?items=Red,Green,Blue&r=2

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="permutation_calculator"]