The calculated distance (air line) between Riga and Cēsis is approximately 51 miles respectively 81 kilometers.
By car or train, the actual journey to Cēsis is certainly longer, as only the direct route (as the crow flies) between Riga and Cēsis has been calculated here.