That's for PC Wealth. For NPCs, consult the table on p 227 for the appropriate item levels. For levels 7 to 20, the rule is, two items of two levels below the NPCs level, then one each the next four levels down. (For 18th, this is 16, 16, 15, 14, 13, 12)
OP, what you are doing is calculating...