A one - dimensional finite - difference computer code has been developed and shown to be quite effective in thermal design and analysis of various plane edge-cooled single - disc windows for gyrotrons with Gaussian rf beam output. The program has a modular structure and is flexible enough to suit specific requirements of users; it can handle nonlinearity. Results obtained for various CVD diamond window cases compare well with the experiment and with the results obtained using ABACUS, a well-established 3-D Finite Element code. Results indicate that a CVD diamond disc with 94 mm diameter and edge cooled by water at 293 K will ensure the passage of 1 MW CW at 140 GHz. A fused quartz window, with 60 mm diamter and operating at 165 GHZ on a 1.5 MW pulsed coaxial gyrotron has also been analysed for its transient characteristics and results are presented.