Since I think there aren't much info about how vendor buy prices work, I will just list them here (for my own greedy reference to future plays as well).
This post is specifically about the prices when "vendors buy" from "you". The sales price is already discussed to death everywhere so no need to say about it.
Some basic things about the "purchase price":
1. It is not affected by your reputation or charisma.
2. It has stages of what I would call "purchase modifier". Each stage increase/decreases the purchase price by 1/6 of a price when the modifier is 0. The modifier has minimum of -2, meaning that price cannot fall below certain line.
3. Purchase modifiers are affected by 2 things:
- # of same item possessed by the vendor
- Base modifier of vendor
For every item of same type that the vendor already possesses, the modifier (for that item only) drops by 1 (to minimum of -2). It makes it better to sell many stacks of things at once, to vendors who do not possess the same item.
Example) A vendor with base modifier of +2 buys a plate mail he will buy it at +2 mod, then next time he buys plate mail he buys it at +1, +0. -1, -2. Then afterwards you sell composite longbow which you haven't sold yet, so it will start at +2.
* Gems and containers are unaffected by the number of items that vendor has, so no matter how many times you sell it the purchase price will remain the same. They are however affected by the base modifiers, so the better-deal vendors will buy gems for higher prices but never lower.
Chart of modifiers vs Sales Price:
| Mod. | Price Adj. |
| -2 | x 4/6 |
| -1 | x 5/6 |
| +0 | x 6/6 |
| +1 | x 7/6 |
| +2 | x 8/6 |
| +3 | x 9/6 |
| +4 | x 10/6 |
| +5 | x 11/6 |
| +6 | x 12/6 |
| +7 | x 13/6 |
| +8 | x 14/6 |
| +9 | x 15/6 |
| +10 | x 16/6 |
Almost all vendors in game have +0 base modifier, but there are few vendors who will buy stuff for extra price:
Therndle Daglefodd (Underdark): +1
Priestess of Sekolah (City of Caverns): +4
Reirra (Suldanessellar): +4
Ribald's Special Shop (Waukeen's Promenade): +5
Bartender (Saradush): +5
Cyhil (Amkethra): +5
Karthis al-Hezzar (North Forest): +6
Carras (Amkethra): +10
** Easy way to check the base modifiers of vendors is to look at prices for containers (gem bag, potion bag, etc). Normal vendors (+0) will buy them for 60 gold, and every +1 to modifier will add 10 gold on top of that. So +1 vendors will show 70 gold, +2 80 gold, +3 90 gold, and so on. Bag of holding has base price of 150 gold. They are not affected by ones that vendors already have, and will always so prices based on vendor modifiers only.