A man was saved by his laptop after a crossbow bolt was fired at him, before being wounded in the head with an axe on his driveway on the NSW central coast.

Police have charged a 49-year-old man with attempted murder over the attack, which took place on Tuesday afternoon.

Police say the 56-year-old victim was carrying a laptop on his driveway in Somersby when a man shot a loaded crossbow at him. When the bolt hit the man's laptop, the attacker ran at the 56-year-old, striking him in the head with an axe.

The pair began to struggle, before another man stepped in to help. The 56-year-old man was taken to hospital with a head wound. The 49-year-old man was arrested and police say they took a crossbow, knives and a piece of wire from him. He was charged with attempted murder and malicious wounding.

The man was refused bail when he appeared at Gosford local court on Wednesday. He is due to appear in court via videolink in September.