A man in his forties was threatened and attacked with a machete at a property on Middle Walk, Scarborough, in the early hours of July 19.
The victim suffered an injury above his eye which required hospital treatment, York Crown Court heard.
Numerous electrical items including a large widescreen TV and sound bar, X-box and X-box games were taken during the incident.
Connor Osbourne, aged 20 of Oxcliff, and 26-year-old Joshua Ireland, of Woodland Place admitted robbery.
Damien Meredith, age 26, of Springfield, pleaded not guilty to robbery but was found guilty following a two day trial.
A 19-year-old man, who cannot be named, admitted robbery and possession of an offensive weapon.
Damien Meredith was jailed for 11 years, Osbourne was jailed for eight-and-a-half-years and Ireland was jailed for nine-years.
The 19-year-old man, was jailed for 11-and-a-half years.
Detective Constable David Adams of Scarborough CID, said: “I am pleased that these four men are now off the streets for a considerable amount of time and to see justice done for the victim, who showed immense bravery in standing up to the offenders.”
“Crimes involving weapons, particularly knives, is understandably a concern to the public but I would like to reassure the North Yorkshire community that incidents of this nature are exceptionally rare and when they do happen, as demonstrated in this case, officers will act quickly to protect the public from harm.
“I hope the sentences passed today send a message to those involved or who are potentially thinking of committing offences involving weapons to think again. Crimes of this nature not only harm the victim and the community in which they occur but being handed such a lengthy sentence ruins the life of the offender.”