Lottery is a form of gambling that awards prizes in accordance with a random drawing of numbers. Prizes may be cash or goods, such as cars and vacations. In the US, state-run lotteries are a major source of revenue for education, public works projects, and other government services. However, a large portion of the money raised is used for marketing and advertising purposes. Lotteries have also been used to raise funds for religious, charitable, and political purposes. Historically, lottery games have been popular in societies with high income inequality and limited social mobility.

The word lottery is derived from the Latin Lottorum, meaning “fateful event” or “lucky accident.” The first recorded lotteries were held in the Low Countries in the 15th century to raise money for town fortifications and to help the poor. A record dated 9 May 1445 at L’Ecluse describes a lottery for raising funds to build walls and town fortifications.

Modern state lotteries generally follow a similar pattern. The state legislates a monopoly for itself, establishes a state agency or public corporation to run the lottery (as opposed to licensing a private firm in return for a percentage of profits), and begins operations with a modest number of relatively simple games. Over time, the demand for additional revenues forces the lottery to progressively expand its offerings in size and complexity, particularly in the form of new games. The state also spends a great deal of time and effort on marketing, with the objective of persuading the public to spend money on lottery tickets.

One of the principal arguments for state lotteries is that they provide an effective and virtually tax-free way to fund government programs. This is a particularly attractive argument in times of economic stress, when states are seeking ways to avoid increasing taxes or cutting public services. Yet studies have shown that state lotteries win broad public approval even in good fiscal times.

Another important aspect of the lottery is that, in some countries, winners can choose to receive a lump sum or an annuity payment for their winnings. The choice can significantly affect the overall amount of the prize, as the time value of money is taken into account. Furthermore, withholdings from annuity payments will reduce the actual payout to the winner.

In addition to the general population, lotteries develop extensive specific constituencies such as convenience store operators (whose business relies on lottery sales); suppliers to the lottery industry (heavy contributions by these entities to state political campaigns are frequently reported); teachers in states where lottery proceeds are earmarked for education; and state legislators, who quickly become accustomed to a steady stream of extra revenue. As a result, state lotteries tend to operate at cross-purposes with the general public interest.