This calculator counts combinations with repetition, the number of ways to choose a number of items from several types when you can pick the same type more than once and the order does not matter. Ordinary combinations assume you cannot repeat an item, but many real situations allow repeats: choosing a dozen doughnuts from six flavours, where you can take several of the same, picking scoops of ice cream from the available flavours, or distributing identical items among categories. Because repeats are allowed but order still does not matter, the count follows a different formula from ordinary combinations, derived by a neat argument known as stars and bars. This tool computes it. You enter the number of types to choose from and the number of items you are choosing, and the calculator returns the number of combinations with repetition, along with the count of arrangements where order does matter for comparison, and the values you entered. The results update as you type. Use it for probability and combinatorics homework, for counting selections where repeats are allowed, or to understand the difference from ordinary combinations. The formula is the combination of n plus r minus 1, choose r, where n is the number of types and r is the number you pick. This comes from the stars and bars method: imagine the r items as stars and use n minus 1 bars to divide them among the n types, then count the arrangements. The calculator also shows n to the power r, the count if order did matter, which is much larger, to highlight how requiring order multiplies the possibilities. This counting principle is a staple of combinatorics and appears throughout probability, where knowing how many ways something can happen is the first step.
Combinations with repetition = (n + r - 1) choose r, by the stars and bars method. Order does not matter and repeats are allowed. n to the power r counts ordered selections.
Choosing r items from n types with repetition allowed, where order does not matter, equals the binomial coefficient of n plus r minus 1, choose r. This comes from the stars and bars argument: the r choices are stars, separated into n groups by n minus 1 bars, and the count is the number of ways to arrange them. The ordered count, where order matters, is n to the power r.
Choosing 3 items from 5 types with repetition allowed gives the combination of 5 plus 3 minus 1, which is 7, choose 3. That equals 35. If order mattered instead, there would be 5 to the power 3, which is 125 ordered selections, far more than the 35 unordered combinations.
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.