While it will largely depend on what you want to use it for, 36 inches is a good length to aim for in a foam roller.
This length is perfect for working out all parts of the body evenly, and requires less effort on your part to use.
However, if you’re looking for some myofascial release in your feet for example, then a smaller foam roller is better.