This combination calculator works out nCr, the number of ways to choose r items from a set of n when the order of selection does not matter. Combinations are the right tool whenever you care which items end up in the group but not the sequence they were picked in. Working out how many six number Lotto tickets are possible, how many different five card hands can be dealt from a deck, or how many ways a panel of three can be selected from twelve applicants are all combination problems. The formula is n factorial divided by r factorial times the factorial of n minus r, which is the same as the permutation count nPr divided by r factorial, since dividing by r factorial removes all the different orderings of the same group. Combination totals grow quickly but more slowly than permutations, because order is no longer counted as different. The calculator works the result out using a stable step by step product rather than huge factorials, so it stays accurate for larger inputs and warns when an answer grows beyond the range it can display exactly. The simple test is whether reordering the chosen items gives you something genuinely different: if not, you want a combination. Enter your n and r values, with r no larger than n, to see the answer instantly.
The calculator uses the smaller of r and n minus r, then multiplies and divides step by step so the running total stays a whole number and avoids overflow. This gives n factorial over r factorial times the factorial of n minus r without ever building the full factorials.
Choosing six numbers from forty, n is 40 and r is 6. That works out to 3,838,380 different combinations, which is why the odds of matching all six in that style of draw are roughly one in 3.8 million.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
© 2019 to 2026 Calculate.co.nz. All rights reserved.