In the relativistic klystron amplifier (RKA), a large coupling hole between input cavity and waveguide port is needed for external power feeding. The optimal coupling factor is derived and a numerical method for calculating the optimal coupling factor is presented. Because of the beam loading effect of intense relativistic electron beam, the optimal coupling coefficient will be much greater than 1, which depends on the effective shunt impendence and beam current. The results indicate that the effective impendence of the cavity is much less than that of the common accelerator cavity and it reduces as the electron initial energy increases. An optimal coupling factor for the washers/rods loaded wide-gap cavity is obtained according to the effective shunt impedance and beam current.