calculate rev