Using a ray-tracing code, we have designed a flat-field grazing-incidence spectrometer with 155mm incident distance. This is different from the conventional design for a flat-field grazing-incidence spectrometer. This spectrometer has good spectral resolution as well as smaller size and improved flexibility. The spectrum covers wavelenth ranges of 4nm-40nm and the spectral resolution is 0.01nm.