The question is, when did Joseph die? I think it was sometime around the "who is my mother" visit from Mary (30 AD in Cheney's Chronology, 31 in Hoehner's). This is the only time on record where Mary comes to interrupt Jesus. He was in the middle of his work, surrounded by large crowds, teaching them difficult things, and yet Mary didn't wait for him to finish. What could have been so pressing, unless it was Joseph on his deathbed? Besides, we know Mary still treasured in her heart the fact that Jesus had to be about his father's business. She must have thought Jesus would make an exception to come home to see Joseph one last time.
Another point in favor of this view - the text suggests Jesus' sisters might have been there as well. The greek plural 'adelphos' is gender neutral - it means "brothers" or "siblings". In other places, this word has been translated "brothers and sisters", and that rendering should be considered here as well. When Jesus responds to the phrase 'adelphos' he says "whoever does the will of God is my brother and sister and mother." So it's at least possible the word "sister" here implies the Lord's own sisters were waiting outside the crowd with Mary and the boys. Combined with the other considerations above, and assuming Mary would want the girls to see Joseph one last time also, I'm thinking it's not just possible, but in fact more likely.
So here's the picture. Mary takes one to three brothers and leaves Capernaum to find Jesus, leaving one or two brothers back home to take care of Joseph. Mary and her sons go through Nazareth first, pick up the girls, and use that travel time to listen for reports about where Jesus is. They find him in one of the towns on the Lakeshore's west side, somewhere south of Capernaum. And then... he doesn't go with them! Is that cold? Not necessarily.
The next thing Jesus does (after the storm and the pigs) is tell the ex-demoniac, who was begging to come along, to go back to his family. Evidently, Jesus felt there were times and seasons for "who is my mother?". Then, immediately after that, Jesus healed Jairus' daughter. A dead girl,
Whatever the case, we have to trust Jesus had his reasons for letting Joseph die without even going to see him. But there is one final detail. This had to be some time later, but the next event on record after Jairus' daughter is the occasion of Jesus' second trip back to Nazareth. (This time the disciples are there, so nobody tries pushing 13 men off a cliff!) Last time, the crowds said, "Is this not Joseph's son?" But this time they leave Joseph out of it. This time, they call him the son of Mary, the brother of James, Joses, Judas and Simon, and they point out his sisters are there with them. Evidently, the sisters have come back from Capernaum and the small town Nazarene folks all know why they were away. Their father just died.
So this Nazareth trip is our last piece of evidence to suggest when Joseph died. But what I think is so very touching - assuming this is all accurate - is that Jesus did go back home to console his sisters. Even if he couldn't make it up to them, even if he couldn't explain and even if they wouldn't understand, the Lord did at least try to go visit his own sisters after their father had died. Okay, he did also preach while he was there, and the visit might not have gone well (at the end, he said a prophet had no honor among his own relatives.) but I do think it's sweet that he went.
At any rate, Joseph of Nazareth must have died in-between the move to Capernaum and Jesus' second visit to Nazareth. Joseph was in Capernaum long enough to have been known by the Jews of that Synagogue, but probably died about a year after the move, around the same time Jesus was healing Jairus' daughter, if not just before. This adds a whole new dimension to the episode in which Jesus told his disciples and the crowds, "Who is my mother?" It might even give us new sympathy for the level of sacrifice the Lord was making, just at that moment, in order to keep on doing the will of his father in heaven.