How selling of stocks and its average price varies

i bought shares as follows on different days
QTY PRICE
25 89
5 91
20 85

AVERAGE BUY PRICE IS 87.6
and sold 15 shares at 93 my average price in holdings become same as earlier 87.6
but showing as 86.72 please some on explain or why

The Buy average calculation is done on FIFO (First In First Out) basis, more on this has been explained here.