PVC pipe is labeled by inside diameter; here's an index for the outside diameter of useful pipe sizes. 1/2-in. i.d. = 7/8-in.
PVC pipe typically costs less than 50 cents a foot, so building your own shelf is incredibly cost-effective — plus, you can tailor the dimensions to the exact specifications of your space.