calculate sample by small & big