Here's the document which judges must refer to. (They're obliged to follow the guidelines unless there are genuinely exceptional circumstances, which a judge must explain in open court):
http://www.sentencing...inst-the%20person.pdf
See the table on page 17. The sentences there refer to first-time offenders convicted after a trial. Previous convictions can push the sentencing range higher but an early guilty plea can see a reduction in the sentence (of one third in the case of custodial sentences).
His solicitor or barrister might get a few clues before the court hearing as to what the sentence might be but there can be no certainty until the judge makes his decision. Some sentencing hearings are effectively 'done and dusted' before the court sits. But, in other cases, the judge might want to hear representations from the defendant's barrister (and possibly from the CPS barrister or even from others, such as the police officers involved in the case) before coming to his decision. I've been in a courtroom when the sentencing process took 2½ hours. (The defendant probably didn't mind because his barrister eventually managed to persuade the judge to pass a non-custodial sentence).
Chris