How many rectangles or squares of (fixed and equal sizes) can fit inside a square of fixed size 320 x 320 ?

3.3k Views Asked by At

Our factory creates graphite sheets. Their machine can only create sheet of one fixed size which is 320 x 320 mm (0.1240 sqm.).

Clients come to us with requests for different sheet sizes, all either square or rectangular in shape. Visually it's easy to judge how many 320 x 320 sheets I would need to use to fulfill the customer demand, but I can't figure out a formula to get this done automatically.

e.g.

A) For a client needing 160 x 160 mm (0.256 sqm) sheet size, visually it's easy to see that I can cut four pieces from each sheet, and nothing goes to waste.

B) Now for a client who needs 161 x 161 mm (0.259 sqm) sheet size, it's obvious that only 1 sheet can fit in a 320 x 320 mm sheet, with nearly 50% going to waste.

So basically I need the following :

In MS Excel e.g. if I could input the "length" and "width" of the customer's sheet size, I want to know how many pcs of that size can I cut out of a single "320 x 320" sheet.

Thanks in advance, Cheers!