stream calculate