A coding method for coding an input sound signal frame by frame of a predetermined time segment by a selected coding processing from a first coding step and a second coding step of coding processing, the coding method comprising: a selection step of judging that switching coding processing from a preceding frame to a present frame is permitted if at least one of a magnitude of energy of high frequency components of an input sound signal of the preceding frame and the magnitude of energy of high frequency components of an input sound signal of the present frame is smaller than or equal to a predetermined threshold value; otherwise, not permitting the switching; wherein the selection step further selects to code the present frame in the second coding step in a case where the input sound signal of the preceding frame was coded in the first coding step and an index indicating that ascents and descents of a spectrum of the input sound signal of the present frame are steep or a degree of concentration of the spectrum is high is smaller than a predetermined threshold value, of cases where switching coding processing from the preceding frame to the present frame is made possible, where the first coding step is a step of coding a coefficient sequence in the frequency domain corresponding to the input sound signal by using a spectral envelope based on coefficients which are convertible into linear prediction coefficients corresponding to the input sound signal; and the second coding step is a step of coding the coefficient sequence in the frequency domain corresponding to the input sound signal, involving variable-length coding which is performed on a differential between a logarithmic value of average energy of coefficients in each partial region obtained by dividing the coefficient sequence in the frequency domain corresponding to the input sound signal into a plurality of partial regions and a logarithmic value of average energy of an adjacent frequency domain. a selection step of judging that switching coding processing from a preceding frame to a present frame is permitted if at least one of a magnitude of energy of high frequency components of an input sound signal of the preceding frame and the magnitude of energy of high frequency components of an input sound signal of the present frame is smaller than or equal to a predetermined threshold value; otherwise, not permitting the switching; wherein the selection step further selects to code the present frame in the second coding step in a case where the input sound signal of the preceding frame was coded in the first coding step and an index indicating that ascents and descents of a spectrum of the input sound signal of the present frame are steep or a degree of concentration of the spectrum is high is smaller than a predetermined threshold value, of cases where switching coding processing from the preceding frame to the present frame is made possible, where the first coding step is a step of coding a coefficient sequence in the frequency domain corresponding to the input sound signal by using a spectral envelope based on coefficients which are convertible into linear prediction coefficients corresponding to the input sound signal; and the second coding step is a step of coding the coefficient sequence in the frequency domain corresponding to the input sound signal, involving variable-length coding which is performed on a differential between a logarithmic value of average energy of coefficients in each partial region obtained by dividing the coefficient sequence in the frequency domain corresponding to the input sound signal into a plurality of partial regions and a logarithmic value of average energy of an adjacent frequency domain.