I am not sure where you got the idea that Jesus was on earth for only 40 days. He was born in Bethlehem and was about 30 when he began his public ministry which lasted 3 years. There is a reference to Jesus being tempted in the wilderness for 40 days,but obviously he was on earth much longer than that.
IMPROVEMENT - Actually the question refers to when Jesus came back from the dead and lived on earth for 40 days until he ascended to heaven. Why only 40 days? Who knows but the number 40 appears a whole lot in The Bible.
After his resurrection, Jesus was on Earth for 40 days before ascending to heaven.
His ascension into Heaven. This was 40 days after His resurrection from the dead.
Jesus stayed 40 days on Earth after his resurrection before ascending to Heaven
After his resurrection, Jesus was on earth for 40 days before ascending into heaven.
After his resurrection, Jesus walked the earth for 40 days before ascending into heaven.
After Jesus resurrected, he appeared to his disciples and followers for a period of 40 days before ascending into heaven.
After the resurrection, Jesus appeared to his disciples and followers for a period of 40 days before ascending into heaven.
According to Christian belief, Jesus lived for 40 days after his resurrection before ascending into heaven.
He didn't go anywhere HE was dead. after three days His Father Jehovah resurrected Him to spirit life. He stood on earth for about 40 days appearing to His disciples at various times and went up to heaven to go before His Father.
According to Acts 1:1-3, Jesus instructed the apostles for forty days between the resurrection and His ascension.
In Luke's Gospel, Jesus went to heaven on the evening following his resurrection. In Acts of the Apostles, Jesus went to heaven forty days after his resurrection. In neither case, does it state where Thomas went.
Jesus was in the tomb for three days before his resurrection.