The victim was treated in hospital for head injuries after the attack, which happened at an address on Besha Avenue in Low Moor, Bradford, at around 10.30pm on Sunday (Dec 30).
Two men knocked on the man's door and forced their way in as the door was opened.
They struck the man with a baseball bat while demanding money.
The victim managed to force them out of his home after they got a few feet inside, but was assaulted in the process.
He was left with head injuries as a result of the incident and received hospital treatment before being discharged.
One of the suspects was wearing a dark hooded tracksuit top and dark bottoms, and was carrying a silver baseball bat.
The other was wearing a light coloured hooded jacket with two small buttoned pockets to either side at the top, and elasticated jogging bottoms.
Detective Inspector Mark Taylor of Bradford CID, said: “This was clearly a very frightening incident for the victim and his female partner who was also in the house, and we are investigating the circumstances of what took place.
“I would like to speak to anyone who saw men behaving suspiciously outside the address just prior to 10.30pm on Sunday or who saw the males fleeing the scene in the direction of Common Lane.
“Anyone who can assist is asked to contact Bradford District CID on 101 referencing crime number 13180652620 of December 30.
“Information can also be given in complete anonymity to the independent Crimestoppers charity on 0800 555 111.”