I tend to go by the idea that selling an item gets you half of the value of buying a new item.
So on a cheap, average, expensive scale, if you assume that 2 cheap items equal an average and 2 average items equal an expensive item. 2 average swords equals 1 expensive sword, but because you are selling second hand swords their value is essentially halved and you need 4 average swords to buy a brand new expensive sword.
After that you have your trading skills to alter the final exchange. If you critical your trading then the buyer settles for 1 of your average swords (and you've got a golden deal), if you fumble then that 1 expensive sword costs you 8 average swords (!?). That's sort of the way I normally deal with it, but then, I normally deal in numbers!
Mr Jealousy has returned to reality!