We find an asymptotic formula for the number of partitions of n whose Young diagrams fit inside an m by l rectangle, equivalently, the coefficients of the q-binomial coefficient ${m + l \choose m}$. Our formula is valid throughout the regime where $l, m$ and $\sqrt{n}$ are all comparable. Previously, sharp asymptotics were derived by Takacs (1986), only in the Central Limit regime, where n is within order $m$ of $l m / 2$. Our approach is to solve a large deviation problem. We describe the tilted measure that produces configurations whose bounding rectangle has the given aspect ratio and is filled to the given proportion. Our results are sufficiently sharp also to yield the first asymptotic estimates on the consecutive differences of these numbers when n is increased by one and m and l remain the same, refining Sylvester’s unimodality theorem.