Carpentry is a skilled trade and a craft in which the primary work performed is the cutting, shaping and installation of building materials during the construction of buildings, ships, timber bridges, concrete formwork, etc. Carpenters traditionally worked with natural wood and did the rougher work such as framing, but today many other materials are also used and sometimes the finer trades of cabinetmaking and furniture building are considered carpentry. In the United States, 98.5% of carpenters are male, and it was the fourth most male-dominated occupation in the country in 1999. In 2006 in the United States, there were about 1.5 million carpentry positions. Carpenters are usually the first tradesmen on a job and the last to leave. Carpenters normally framed post-and-beam buildings until the end of the 19th century; now this old fashioned carpentry is called timber framing. Carpenters learn this trade by being employed through an apprenticeship training—normally 4 years—and qualify by successfully completing that country's competence test in places such as the United Kingdom, the United States, Canada, Australia and South Africa. It is also common that the skill can be learned by gaining work experience other than a formal training program, which may be the case in many places.
Wood is one of mankind's oldest building materials. The ability to shape wood improved with technological advances from the stone age to the bronze age to the iron age. Some of the oldest archaeological evidence of carpentry are water well casings built using split oak timbers with mortise and tenon and notched corners excavated in eastern Germany dating from about 7,000 years ago in the early neolithic period. Relatively little information about carpentry is available from pre-history (before written language) or even recent centuries because the knowledge and skills were passed down person to person, rarely in writing, until the printing press was invented in the 15th century and builders began regularly publishing guides and pattern books in the 18th and 19th centuries. The oldest surviving complete architectural text is Vitruvius' ten books collectively titled De architectura, which discuss some carpentry. Some of the oldest surviving wooden buildings in the world are temples in China such as the Nanchan Temple built in 782, the Greensted Church, parts of which are from the 11th century, and the stave churches in Norway from the 12th and 13th centuries.