Thanks a lot.The best way to find a price for commonly sold phones like iphones is to look up the price based on the condition of your phone on Cashify. They provide the absolute worst price because they offer the convenience and they have to make money by flipping that.
If you sell directly to a buyer. So add around 5-7% on top of that for an out of warranty phone and 10-15% on top of that for an in warranty phone. With some patience ( a couple weeks) you will be able to sell at that price and I have done it before on olx.
On Cashify for an excellent condition out of warranty xs max 64 it shows 41700. My guess is you should be able to sell it at around 45000 if the condition is perfect.