The worm climbs 8 feet during the day and slides back down 2 feet at night, so it makes a net progress of 8 - 2 = 6 feet each day. Therefore, to climb a total of 26 feet, the worm will need to make 26 / 6 = 4.33... days of progress.
However, since the worm cannot complete a fraction of a day, we need to round up to the next whole day. So, it will take the worm 5 days to climb out of the well.