A wasp is any insect of the order Hymenoptera and suborder Apocrita that is neither a bee nor an ant. The Apocrita have a common evolutionary ancestor and form a clade; wasps as a group do not form a clade, but are paraphyletic with respect to bees and ants.
The most commonly known wasps, such as yellowjackets and hornets, are in the family Vespidae and are eusocial, living together in a nest with an egg-laying queen and non-reproducing workers. Eusociality is favoured by the unusual haplodiploid system of sex determination in Hymenoptera, as it makes sisters exceptionally closely related to each other. However, the majority of wasp species are solitary, with each adult female living and breeding independently. Wasps play many ecological roles. Some are predators or pollinators, whether to feed themselves or to provision their nests. Many, notably the cuckoo wasps, are kleptoparasites, laying eggs in the nests of other wasps. Many of the solitary wasps are parasitoidal, meaning they lay eggs on or in other insects (any life stage from egg to adult) and often provision their own nests with such hosts. Unlike true parasites, the wasp larvae eventually kill their hosts. Solitary wasps parasitize almost every pest insect, making wasps valuable in horticulture for biological pest control of species such as whitefly in tomatoes and other crops.
Wasps first appeared in the fossil record in the Jurassic, and diversified into many surviving superfamilies by the Cretaceous. They are a successful and diverse group of insects with tens of thousands of described species; wasps have spread to all parts of the world except for the polar regions. The largest social wasp is the Asian giant hornet, at up to 5 centimetres (2.0 in) in length; among the largest solitary wasps is a group of species known as tarantula hawks, along with the giant scoliid of Indonesia (Megascolia procer). The smallest wasps are solitary chalcid wasps in the family Mymaridae, including the world's smallest known insect, with a body length of only 0.139 mm (0.0055 in), and the smallest known flying insect, only 0.15 mm (0.0059 in) long.