Simplified quartiles calculation