Lottery is a gambling game where people pay a small amount to have a chance of winning a large sum of money. The games are often run by state governments and offer multiple prizes, with the highest prize amount usually in the millions of dollars. People buy tickets for a chance to win and receive a random selection of winners.

Lotteries are a popular way for states to raise funds. The money raised is used for public benefits, including schools and hospitals. While they may not be as effective as other methods of raising funds, they are popular among the public and are easy to organize.

When a high demand for something is limited, a lottery can be used to distribute the available items in a fair manner. Examples include units in a subsidized housing block or kindergarten placements at a reputable school. In addition to its wide appeal as a form of gambling, the lottery is also widely used in sports to fill vacancies on teams among equally qualified players.

The earliest records of a lottery date back to the Low Countries in the 15th century, when towns held private lotteries to fund wall and town fortifications. In the US, the Continental Congress voted to establish a lottery in 1776 as a means of raising money for the Revolution. Today, most states hold lotteries. Winners are often awarded a lump sum or annuity payments, with the structure of the annuity payments varying based on state rules and lottery company regulations.