The diameter of a regulation-sized basketball rim, used in the NBA, NCAA, and high school, is 18 inches.
International Rules
The International Basketball Federation official rules specify that the rim has a minimum inside diameter of 450 millimeters and a maximum of 459 millimeters. This approximates to 17.7 to 18 inches, in which case the rim radius is about the same as the NBA standard 9-inch radius. The rules for ball circumference allow for a minimum of 29.4 inches and maximum of 30.7 inches.