Jamie Gillard, of Donnybrook, Bracknell, admitted two counts of robbery and one count of possession of a bladed article at Reading Crown Court and was sentenced on Friday 14 December.
At about 11.30pm on 26 August, the two victims, who were aged 16, were walking along a footpath near Donnybrook when Gillard approached them and produced a knife.
He demanded both the victims hand over their mobile phones, which they did, before walking off.
The victim recognised Gillard so was able to identify him to police.
PC Marc Boyd, of the Priority Crime Team based in Bracknell, said: "This was a nasty robbery of two teenage boys in which a knife was brandished to both frighten and intimidate them into handing over their belongings.
"I welcome the sentence given to Gillard and hope it sends out a clear message that crimes like this are completely unacceptable and those committing them will be pursued by both the police and the courts and brought to justice."