Fudge is a soft, dense confection made by cooking sugar, milk or cream, and butter to the soft-ball stage (about 234-240°F / 112-116°C), then beating the mixture as it cools so sugar crystallizes into a smooth, creamy texture rather than a hard candy. It originated in the United States in the late 19th century, with the earliest known recipe dating to 1886; the name is thought to come from the informal verb 'to fudge,' meaning to improvise, since early recipes are said to have come from failed caramel batches. Chocolate is the most common flavoring, though vanilla, maple, and peanut butter versions are also common. Fudge is eaten on its own, cut into squares, or used as a filling or topping for cakes and cookies.