An improved coupled-mode formulation based on the ideal modes of the coupled waveguides (ideal composite modes) is presented. In comparison with the formulation based on the ideal modes of the individual waveguides (ideal waveguide modes), the formulation in terms of composite modes is more rigorous and yields a more accurate grating period and coupling lengths when the two waveguides are strongly coupled. In addition, the radiation loss due to input and output junctions can be considered in the composite-mode formulation. A new analytical solution to the coupled-mode equations is derived in which all the spatial harmonics generated by the periodic grating are taken into account. The power exchange between the waveguides is examined by considering the input and the output conditions. The phase-matching conditions and the coupling lengths are calculated and compared with the analysis in terms of the waveguide modes, The grating period predicted by the waveguide-mode formulation agrees very well with that by the composite-mode formulation, but dramatically different coupling lengths are predicted by the two formulations due to their critical dependence on the field profiles.