How long was Jesus in the tomb? Christians commonly celebrate Good Friday as the day that Jesus was crucified, and Easter Sunday as the day that Jesus rose from the tomb. Most relevant verses in scripture say that Jesus would be in the tomb for three days. (See Matthew 26:61; Mark 8:31; John 2:19.) However, one verse states that Jesus would also be in the tomb for three nights:


  For as Jonah was three days and three nights in the
  belly of a huge fish, so the Son of Man will be three days and three
  nights in the heart of the earth. (Matthew 12:40)


How can this be? Friday to Sunday could be considered three days, but it is only two nights.

I've heard it explained before that the Jewish people would define the end of one day and the start of the next as sundown, or about the 12th hour. This is why the Sabbath would always start on Friday at sundown. Jesus was buried just before sundown, or just before the Sabbath began (Matthew 27:57-61; Mark 15:42-47; Luke 23:50-56, John 19:38-42). This can explain the three days, but as the other commenter pointed out, it still does not explain the three nights.
From this discussion, if "three days and three nights" is taken idiomatically, it means 3 days as the Jewish people of the day would have understood it.


  Now lets take a look at Jesus time in the sepulchre:
  
  Part of Friday = one dayspan. 
  
  All of Saturday = one dayspan. 
  
  Part of Sunday = one dayspan.
  
  Literally three days and three nights? No. Idiomatically three days
  and three nights (i.e., three dayspans), as uncleanness-periods were
  measured? Yes.