Gratis versus libre is the distinction between two meanings of the English word "free"; namely, "for zero price" (gratis) and "with few or no restrictions" (libre). The ambiguity of "free" can cause issues where the distinction is important, as it often is in dealing with laws concerning the use of information, such as copyright and patents.
The terms are used in the free software and open source communities, as well as the broader free culture movement, to categorize computer programs according to the licenses and legal restrictions that cover them. For example, they are used to distinguish freeware (gratis software) from free software (libre software).
Gratis in English is a colloquialism adopted from the various Romance and Germanic languages, ultimately descending from the plural ablative and dative form of the first-declension noun grātia in Latin. It denotes "free of charge", "at zero cost", "for free", in the sense that one does not have to pay for some good or service, even though the good or service may have value.
Libre (pronounced /ˈliːbrə/) in English is a neologism adopted from the various Romance languages, ultimately descending from the Latin word līber. It denotes "the state of being free", as in "liberty" or "having freedom".
Although Gratis appears in many English dictionaries, including the Oxford English Dictionary, Libre does so less commonly, and no other English adjective signifies "liberty" exclusively and as distinct from "at no monetary cost".
In software development, where the cost of mass production is relatively small, it is common for developers to make software available at no cost. One of the early and basic forms of this model is called freeware. With freeware, software is licensed free of charge for regular use, the developer does not gain any monetary compensation.
With the advent of the free software movement, license schemes were created to give developers more freedom in terms of code sharing, commonly called open source or FOSS. As the English adjective "free" does not distinguish between "for zero price" and "liberty", the phrases "free as in beer" (gratis, freeware) and "free as in speech" (libre, open source) were adopted.
These phrases have become common, along with gratis and libre, in the software development and computer law fields for encapsulating this distinction.