The issue at hand, is I will have a rectangle of size(adsbygoogle = window.adsbygoogle || []).push({}); x. This rectangle will containnsmaller rectangles. Each of these smaller rectangles is the same size though.

I need to figure out how to calculate the SIZE that the smaller rectangles should be, based on

1) the size of the encompassing rectangle

2) the number of smaller rectangles that go inside it

so that I can fill the maximum area inside the main rectangle, without altering the height/width ratio of the smaller rectangles (ie they can grow in size, but they can't be sized in a way that it distorts their height/width ratio, so some area in the encompassing rectangle will not be filled in, and this is ok)

both these values are known when I need to do the calculation.

Here are a few images to illustrate this (note sizes of red rectangles in each image are always the same). Is there any specific geometric formula to do this?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Geometry Question

**Physics Forums | Science Articles, Homework Help, Discussion**