Because robbery is violent and always a felony (whether first or second-degree), it can result in sentences of 2 - 9 years in state prison. The severity of the sentence depends on whether the robbery is first-degree or second-degree (PC 212.5).
If robbery is first-degree and committed in concert (with an accomplice) or in a dwelling, the punishment could be 9 years in prison. But other cases of first-degree robbery could be a 6 year sentence.
However, if the robbery is second-degree, the sentence could be up to 5 years in state prison.