{"uid":"cap_D4H1rItTfYxKZ1NYqVyj5","slug":"permutations-calculator-npr-e98ab9d1","name":"Permutations Calculator (nPr)","description":"Number of ordered arrangements of r items from n, nPr = n!/(n-r)!. Requires r ≤ n and r ≤ 10000.","url":"https://combinatorics.openverbs.com/v1/permutations","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["n","r"],"properties":{"n":{"type":"string","pattern":"^\\d+$","description":"Non-negative integer ≤ 1000000."},"r":{"type":"string","pattern":"^\\d+$","description":"Non-negative integer, r ≤ n."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4pSw7waa2XEZELvAlHnbC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the number of ordered arrangements of r items chosen from n distinct items using nPr = n!/(n-r)!","exampleAgentPrompt":"How many ordered arrangements can be made by picking 4 items from a set of 10? Calculate nPr where n is 10 and r is 4.","exampleUseCases":[{"title":"Ranked contest podium arrangements","prompt":"I have 20 athletes competing and I need to award gold, silver, and bronze medals — how many distinct podium orderings are possible? That's choosing 3 from 20 in order."},{"title":"Password combination counting","prompt":"My system generates ordered PIN codes using 5 digits drawn without repetition from a pool of 12 unique digits — how many distinct PINs are possible? Compute the permutation for n=12, r=5."},{"title":"Scheduling ordered interview slots","prompt":"I have 8 candidates and I need to fill 3 ranked interview slots in a specific order — first, second, and third. How many ways can I arrange those 3 from my 8 applicants?"}],"resultDescription":"Returns an exact integer (as a large decimal string) representing the number of ordered arrangements of r items selected from n, i.e., nPr = n!/(n-r)!. The result may be a very large number for large inputs.","failureModes":["r > n: invalid input since you cannot arrange more items than exist in the set","r > 10000: exceeds the maximum allowed r value","n > 1000000: exceeds the maximum allowed n value","Non-integer or negative values for n or r: schema requires non-negative integer strings","Missing required fields n or r: returns validation error"],"whenToPreferThis":"Choose this endpoint when you need the count of ordered selections (permutations) rather than unordered subsets (combinations/nCr). Use it when order matters — e.g., ranking, scheduling, sequencing, or constructing ordered codes. Prefer this over the nCr sibling endpoint when the arrangement sequence is significant. Use the factorial endpoint instead if you need n! directly rather than n!/(n-r)!.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:31:38.432Z","isFirstParty":false}