A numerical simulation for the transmission of x rays through glass capillaries of different geometries is described. The simulation includes corrections for surface roughness and absorption losses of the glass. These calculations are compared with experimental measurements of the transmission and exit divergence of the x rays. By fitting the experimental results with the calculations, the surface roughness of a capillary is estimated.© (1993) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.