Every community has a gold piece limit based on its size and population. The gold piece limit (see Table 5–2) is an indicator of the price of the most expensive item available in that community. Nothing that costs more than a community’s gp limit is available for purchase in that community. Anything having a price under that limit is most likely available, whether it be mundane or magical.
While exceptions are certainly possible (a boomtown near a newly discovered mine, a farming community impoverished after a prolonged drought), these exceptions are temporary; all communities will conform to the norm over time.
To determine the amount of ready cash in a community, or the total value of any given item of equipment for sale at any given time, multiply half the gp limit by 1/10 of the community’s population. For example, suppose a band of adventurers brings a bagful of loot (one hundred gems, each worth 50 gp) into a hamlet of 90 people. Half the hamlet’s gp limit times 1/10 its population equals 450 (100 ÷ 2 = 50; 90 ÷ 10 = 9; 50 × 9 = 450). Therefore, the PCs can only convert nine of their recently acquired gems to coins on the spot before exhausting the local cash reserves. The coins will not be all bright, shiny gold pieces. They should include a large number of battered and well-worn silver pieces and copper pieces as well, especially in a small or poor community.
If those same adventurers hope to buy longswords (price 15 gp each) for their mercenary hirelings, they’ll discover that the hamlet can offer only 30 such swords for sale, because the same 450 gp limit applies whether you’re buying or selling in a given community.

Table 5–2: Random Town Generation

d%

Town Size

Population*

GP Limit

01–10

Thorp

20–80

40 gp

11–30

Hamlet

81–400

100 gp

31–50

Village

401–900

200 gp

51–70

Small town

901–2,000

800 gp

71–85

Large town

2,001–5,000

3,000 gp

86–95

Small city

5,001–12,000

15,000 gp

96–99

Large city

12,001–25,000

40,000 gp

100

Metropolis

25,001 or more

100,000 gp

Adult population. Depending on the dominant race of the community, the number of nonadults will range from 10% to 40% of this figure.