<r>jwmaiden,Not that many people care about fortran these days, but here is a link to what I think you want in f77 and f95.My code, free to use.<URL url="http://www.quantmod.com/fortran/nCr.fhttp://www.quantmod.com/fortran/nCr.f95Like"><LINK_TEXT text="http://www.quantmod.com/fortran/nCr.fht ... Cr....