At the High Court in Glasgow, Martin Magee, 38, was found guilty of stabbing Hugh Porteus through the heart at a flat in Neil Street, Greenock on August 22, last year.
The court heard that Magee, with his face masked, and another unknown masked man entered the flat armed with a machete and knife.
The flat was a drugs den, the court was told, and Magee and his accomplice were there to rob the occupants of drugs and money.
Unfortunately for Mr Porteous he was in the wrong place at the wrong time.
The painter and decorator had gone to the flat to price a job for the occupant David Rice and was there when Magee and the other man burst in.
They demanded drugs and money and threatened to cut off Mr Rice's fingers.
They then struck him on the head with a machete and a knife.
They also assaulted a woman, Jacqueline Branchfield, by threatening her with a baseball bat, and attacked another man, James Kane.
Mr Porteous was stabbed once in the side and the blade sliced through his heart.
Judge Lady Scott will sentence Magee on January 18 at the High court in Edinburgh.
Defence counsel Thomas Ross will give his plea in mitigation then.