Lottery is a gambling game in which participants pay an entry fee for a chance to win a prize, usually a large sum of money. The odds of winning vary depending on the amount of money paid in and the number of tickets purchased.

In most countries, state-sponsored lotteries are legal and regulated by law, and their proceeds are often used to fund public projects. In the United States, there are a variety of games that can be played, including instant-win scratch-off games, daily games, and games where players select numbers or symbols. Most lottery games have a 50 percent or higher payout to winners.

A common feature of all lotteries is some mechanism for recording the identities and amounts staked by bettors, and a means of selecting the winners. For a simple lottery, this may be as simple as drawing lots from a pool of tickets or counterfoils; for a complex lottery, it is more likely to involve computerized shuffling and randomizing procedures.

The first recorded lotteries to offer tickets for sale with prizes in the form of money appeared in the Low Countries in the 15th century, with towns holding public lotteries to raise funds for building walls and town fortifications, and to help the poor. During the French and Indian War, colonial America embraced lotteries, which were used to finance roads, canals, churches, libraries, colleges, and other public works, as well as private ventures such as land acquisition.