revenue calculations