Both the men's and women's Olympic 5x5 basketball tournaments include 12 teams.
The Olympic basketball format divides those 12 teams into three preliminary groups of four. Each team plays the others in its group once, after which the top two teams from each group and the two best third-place teams advance to an eight-team quarterfinal stage.
This structure applies to both tournaments at the Paris 2024 Games. The United States won the men's tournament, defeating France in the final, while the United States also won the women's tournament, again defeating France. The equal 12-team fields make the two competitions comparable even though their qualification paths and histories differ.
The question refers to traditional five-on-five basketball, often written as 5x5. It should not be confused with Olympic 3x3 basketball, which uses a separate competition and a different number of participating teams. Also, 12 teams means 12 national teams—not 12 players; each Olympic roster normally contains 12 players.