How to calculate
For a stack size of 64, divide total items by 64. The whole part gives full stacks and the remainder gives loose items. To reverse it, multiply the full stacks by the stack size and add the loose items.
Worked example
Use Convert Items to stacks · Maximum items per stack 64 · Total items 150. The result is 2 stacks + 22.
Input and result notes
Many items stack to 64. Change the stack size to 16, 1, or another limit for the item you are storing.