My dealer usually says KBB fair trade in (the lowest one, sometimes they go up to good if the car is pristine), if your selling private party probably a couple grand more.
The real price is what people will pay, so looking at what they have sold for at auction or on ebay gives you a pretty good starting point, for low mileage probably looking in the 23 range for trade and 25 range private party depending on options, maybe a bit more.
2008 335i Vert Montego/Saddle/Grey Poplar
2011 Audi S4 Deep See Blue/Black/Stainless
2014 X3 35i M-Sport Space Grey/Chestnut/Fineline Wave