Package dimensions are calculated with consideration to the packaging type, as follows:
Boxes and Tubesuse the outermost dimensions of the box or tube, so the package dimensions = the box's or tube's dimensions.
Bags and Paksuse the contents' dimensions. We stack in the shortest dimension (height), and use the maximum of the remaining widths and lengths. So, a package with two items 12"x12"x0.5" and 5"x15"x1.0" would result in total dimensions of 12"x15"x1.5".
Bubble Mailers, Envelopes, and Flatshave a fixed length and width, but the height can expand to fit multiple items.