NPCs, Gold and disposable income

My campaign is running for some time now and more and more often I wonder how much Gold an NPC has available. Things like:

-How much gold has the local alchemist saved up to buy funky dwarven contraptions?

-A poor (but pretty high level) mage had to spend all his treasure to rebuild his spellbook. How can he earn money to build up his power to former levels?

-How expensive can the current pet project of the local dwarven machinist be?

I guess with magic users or priests I could use the “Spell Availability by Market” table to sell his Spells but that seems to be a pretty high income.

An 11th level mage can cast 4/3/3/3/2/1 (and dominates the upper end of a Class III market). If every spell sold every day, he would make 250 thousand gold per month (compared to his living expenses of 12–80 thousand gold per month).

However, the high-level spells worth having in an urban center are:

Level 4: remove curse, wall of fire (city defense, occasional only), wizard eye.
Level 5: conjure elemental, telekinesis, teleport, wall of stone.
Level 6: control weather, flesh to stone, geas, lower water, move earth, reincarnate, wall of iron.

Most of those won’t be sellable on a daily basis in a Class I market, much less a Class III; they are available because the mage lives there, not because they are sold every day. In fact, if they sold every day, they likely would not be available to the adventurers!

Given that the mage most likely sells them to fund his research, I would add the typical monthly cost of research to the expected cost of living, and then back-calculate roughly how many spells per day that results in.

could we not assume that a mage (or any high level NPC) could be making an average monthly pay equal to their GP threshold?

Jard beat me to it. In point of fact, the GP thresholds are the average monthly wages of NPCs of given levels. That's why they are the GP thresholds.