Getting Cubase to decide the tempo automatically

It’s ‘Process Tempo’ in the Tempo editor.

Set the locators to the original material and open the Tempo Track Editor.
Click the Process Tempo icon (or set a Key Command to it)
The original length is shown.
In the New Range area set the ‘end’ to the time or bars location you want.
Hit Process, the new tempo is inserted at the left locator.

There’s a help button in the dialog too…