It is said to be originated from the Heian Period among court nobles who would celebrate the passage of their children into the middle childhood. The ages three, five, seven are consistent with East Asian numerology which claims that odd numbers are lucky. The practice was set to the fifteenth of the month during the Kamakura Period.
Over time, this tradition passed to the samurai class who added a number of rituals. Children—who up until the age of three were required by custom to have shaven heads—were allowed to grow out their hair. Boys of age five could wear hakama for the first time, while girls of age seven replaced the simple cords they used to tie their kimono with the traditional obi. By the Meiji Period, the practice was adopted amongst commoners as well, and included the modern ritual of visiting a shrine to drive out evil spirits and wish for a long healthy life.
The tradition has changed little since the Meiji Period. While the ritual regarding hair has been discarded, boys who are aged three or five and girls who are aged three or seven are still dressed in kimono—many for the first time—for visits to shrines. Three-year-old girls usually wear hifu (a type of padded vest) with their kimono. Western-style formal wear is also worn by some children. A more modern practice is photography, and this day is well known as a day to take pictures of children. In some cases, families observe the rite based on the traditional way of counting one's age, or kazoedoshi, where you are one-year-old at birth and then add a year on each succeeding lunar new year.
Chitose Ame (千歳飴), literally "thousand year candy", is given to children on Shichi-Go-San. Chitose Ame is long, thin, red and white candy, which symbolizes healthy growth and longevity. It is given in a bag with a crane and a turtle on it, which represent long life in Japan. Chitose Ame is wrapped in a thin, clear, and edible rice paper film that resembles plastic.