calculate size from the scalar itself