A lottery is a form of gambling in which people purchase chances to win a prize by chance. The prizes are typically cash or goods. The odds of winning a lottery are often very low, but this does not prevent many people from playing. Some governments have legalized lotteries, while others prohibit them or regulate them.
The first lotteries were probably public games held to raise funds for walls and town fortifications in the Low Countries in the 15th century, according to records of the towns of Ghent, Utrecht, and Bruges. They also raised money for poor relief and the arts. In modern times, the largest lottery is in the United States. In fiscal year 2019, which ended in March, US lottery sales topped $91 billion. The vast majority of lottery revenues go to state and local government, and some go toward education and health.
In addition to a prize pool, a lottery must have a mechanism for collecting and banking the money that is paid for tickets. In some cases, a fixed percentage of the total ticket sales goes to costs for organizing and promoting the lottery. The remainder of the pool is used for the prize winners.
The first official lottery was created by Francis I of France in or around 1505. It was banned two centuries later and then reintroduced, both as a public lottery for the city of Paris and as private ones for religious orders such as nuns.