<p>I have a program that will calculate the minimal area taken by fitting rectangles together.</p>

<p>Input: Rectangles of different height and width.<br>
Output: One rectangle that contains all these rectangles.<br>
Rules: One cannot turn or roll the rectangles around and they cannot overlap.</p>

<p>I understand that this is related or is possibly defined as a bin packing problem (NP-hard). However the algorithms i found for those often set a limit on for example width. I have no such limits, the only goal is to get the resulting area as small as possible.</p>

<p>Any pointers on what algorithm is appropriate to get a decent solution?</p>

I'd start by skimming through
http://mathworld.wolfram.com
- they're awesome for stuff like this.
Second, I could envision a dopey algorithm that would put the longest (in the X dimension) box on the bottom, then the tallest (in the Y dimension) on top of it on one side or the other. Then continue stacking them in this "stair-stepped" fashion going right wards and upwards (for example go right until you can't, then go up, etc, etc).
That's probably non-ideal, and may very well give you bad results, but it's what popped to mind first.