The size of a flag is measured by its length or fly, and this is governed in yards. The shorter breadth is known as its hoist.
Estimate size is determined by the height at which the flag is flown. The simple rule to determine this is 1 yard for every 10' of flagstaff. Therefore, as 25' free standing flagpole would require a 2.5 yard flag, and a 40' flagpole a 4 yard flag.
Please remember this is a general rule and may not apply to all situations.
Different considerations apply when the flag is flying from a flagstaff on the top of a building. Here szie is based on the overal proportions of the building and of the flag. In order to ensure the flag appears aesthetically correct when flying, one should generally adopt a scale of one sq ft of flag per one linear foot of height.