In biogeography, a taxon is said to have a cosmopolitan distribution if its range extends across all or most of the world in appropriate habitats. Such a taxon, usually a species, is said to exhibit cosmopolitanism or cosmopolitism. The extreme opposite of a cosmopolitan species is an endemic one, being found only in a single geographical location.
The term pandemism also is in use, but not all authors are consistent in the sense in which they use the term; some speak of pandemism mainly in referring to diseases and pandemics, and some as a term intermediate between endemism and cosmopolitanism, in effect regarding pandemism as subcosmopolitanism. This means near cosmopolitanism, but with major gaps in the distribution, say, complete absence from Australia.   Terminology varies, and there is some debate whether the true opposite of endemism is pandemism or cosmopolitism. 
The term "cosmopolitan distribution" usually should not be taken literally, because it often is applied loosely in various contexts. Commonly the intention is not to include polar regions, extreme altitudes, oceans, deserts, or small, isolated islands.  For example, the housefly is nearly as cosmopolitan as any animal species, but it is neither oceanic nor polar in its distribution.  Similarly, the term "cosmopolitan weed" implies no more than that the plant in question occurs on all continents except Antarctica; it is not meant to suggest that the species is present in all regions of every continent.
Another concept in biogeography is that of oceanic cosmopolitanism and endemism. Although there is a temptation to regard the World Ocean as a medium without biological boundaries, this is far from reality; many physical and biological barriers interfere with either the spread or continued residence of many species. For example, temperature gradients prevent free migration of tropical species between the Atlantic and Indian-plus-Pacific oceans, even though there is open passage past continental masses such as the Americas and Africa/Eurasia. Again, as far as many species are concerned, the Southern Ocean and the Northern marine regions are completely isolated from each other by the intolerable temperatures of the tropical regions. In the light of such considerations, it is no surprise to find that endemism and cosmopolitanism are quite as marked in the oceans as on land.
Another aspect of cosmopolitanism is that of ecological limitations. A species that is apparently cosmopolitan because it occurs in all oceans might in fact occupy only littoral zones, or only particular ranges of depths, or only estuaries, for example. Analogously, terrestrial species might be present only in forests, or mountainous regions, or sandy arid regions or the like. Such distributions might be patchy, or extended, but narrow. Factors of such a nature are taken widely for granted, so they seldom are mentioned explicitly in mentioning cosmopolitan distributions.
Cosmopolitanism of a particular species or variety should not be confused with cosmopolitanism of higher taxa. For example, the family Myrmeleontidae is cosmopolitan in the sense that every continent except Antarctica is home to some indigenous species within the Myrmeleontidae, but nonetheless no one species, nor even genus, of the Myrmeleontidae is cosmopolitan. Conversely, partly as a result of human introduction of unnatural apiculture to the New World, Apis mellifera probably is the only cosmopolitan member of its family; the rest of the family Apidae have modest distributions.
Even where a cosmopolitan population is recognised as a single species, such as indeed Apis mellifera, there generally will be variation between regional sub-populations. Such variation commonly is at the level of subspecies, varieties or morphs, whereas some variation is too slight or inconsistent for formal recognition.
For an example of subspecific variation, consider the so-called " African killer bee", which is the subspecies Apis mellifera scutellata, and the Cape bee, which is the subspecies Apis mellifera capensis; both of them are in the same cosmopolitan species Apis mellifera, but their ranges barely overlap.
Other cosmopolitan species, such as the osprey and house sparrow, present similar examples, but in yet other species there are less familiar complications: some migratory birds such as the Arctic tern occur from the Arctic to the Southern Ocean, but at any one season of the year they are likely to be largely in passage or concentrated at only one end of the range. Also, some such species breed only at one end of the range. Seen purely as an aspect of cosmopolitanism, such distributions could be seen as temporal, seasonal variations.
Other complications of cosmopolitanism on a planet too large for local populations to interbreed routinely with each other, lead to genetic effects such as ring species, for example in the Larus gulls.  They also lead to the formation of clines such as in Drosophila. 
In the modern world, the killer whale, the blue whale, and the great white shark all have cosmopolitan distribution, extending over most of the Earth's oceans. The wasp Copidosoma floridanum is another example, as it is found around the world. Other examples include humans, cats, dogs, the western honey bee, the foliose lichen Parmelia sulcata, and the mollusc genus Mytilus.  The term can also apply to some diseases. It may result from a broad range of environmental tolerances   or from rapid dispersal compared to the time needed for speciation. 
- Michael G. Simpson (19 July 2010). Plant Systematics. Academic Press. p. 720. ISBN 978-0-08-092208-9.
- D. A. T. Harper; T. Servais (27 January 2014). Early Palaeozoic Biogeography and Palaeogeography. Geological Society of London. p. 31. ISBN 978-1-86239-373-8.
- Eduardo H Rapoport (22 October 2013). Areography: Geographical Strategies of Species. Elsevier. p. 251. ISBN 978-1-4831-5277-6.
- Encyclopedia of Ecology and Environmental Management. John Wiley & Sons. 15 July 2009. p. 164. ISBN 978-1-4443-1324-6.
- Richard C. Russell; Domenico Otranto; Richard L. Wall (2013). The Encyclopedia of Medical and Veterinary Entomology. CABI. p. 157. ISBN 978-1-78064-037-2.
- Werner Kunz (2 August 2013). Do Species Exist: Principles of Taxonomic Classification. Wiley. p. 211. ISBN 978-3-527-66426-9.
- Costas B. Krimbas; Jeffrey R. Powell (21 August 1992). Drosophila Inversion Polymorphism. CRC Press. p. 23. ISBN 978-0-8493-6547-8.
- Sahney, S.; Benton, M. J. (2008). "Recovery from the most profound mass extinction of all time". Proceedings of the Royal Society B: Biological Sciences. 275 (1636): 759–65. doi: 10.1098/rspb.2007.1370. PMC 2596898. PMID 18198148.
- Ian F. Spellerberg; John William David Sawyer, eds. (1999). "Ecological patterns and types of species distribution". An Introduction to Applied Biogeography. Cambridge University Press. pp. 108–132. ISBN 978-0-521-45712-5.
- S. Kustanowich (1963). "Distribution of planktonic foraminifera in surface sediments of the south-west Pacific". New Zealand Journal of Geology and Geophysics. 6 (4): 534–565. doi: 10.1080/00288306.1963.10420065.
- D. B. Williams (1971). "The distribution of marine dinoflagellates in relation to physical and chemical conditions". In B. M. Funnell; W. R. Riedel (eds.). The Micropalaeontology of Oceans: Proceedings of the Symposium held in Cambridge from 10 to 17 September 1967 under the title 'Micropalaeontology of Marine Bottom Sediments'. Cambridge University Press. pp. 91–95. ISBN 978-0-521-18748-0.
- Judit Padisák (2005). "Phytoplankton". In Patrick E. O'Sullivan; Colin S. Reynolds (eds.). Limnology and Limnetic Ecology. The Lakes Handbook. 1. Wiley-Blackwell. pp. 251–308. ISBN 978-0-632-04797-0.
- The dictionary definition of cosmopolitan at Wiktionary