A data analyzing device, comprising: a data acquiring section configured to acquire data for each of a plurality of samples, the data representing a chromatogram or mass spectrum; an empirical information setting section configured to acquire or set a plurality of kinds of empirical information for each of the plurality of samples, the empirical information showing a property of each sample; a condition selecting section configured to allow an operator to select a condition for grouping based on first empirical information which is one of the plurality of kinds of empirical information; a group forming section configured to perform grouping of the plurality of samples into N groups based on the condition for grouping selected through the condition selecting section, where N is an integer equal to or greater than three; a group rearrangement condition specifying section configured to allow an operator to input a changed criterion for grouping to specify, for each of the N groups formed by the group forming section or for each of the samples included in each of the N groups, a condition for rearranging the N groups using second empirical information which is one of the plurality of kinds of empirical information previously set by automatically reading information from an external source or according to manual input by an operator; a group rearranging section configured to form M groups, where N>M, by selecting one or more groups from the N groups formed by the group forming section and merging the selected groups together as needed, based on the condition for rearranging the groups specified through the group rearrangement condition specifying section; and a differential analysis section configured to analyze a difference in a peak of the chromatogram or mass spectrum between a plurality of groups formed by the group forming section or the group rearranging section, using the data acquired by the data acquiring section and included in each of the groups, where the differential analysis section is configured to perform a differential analysis between the N groups formed by the group forming section, using the data corresponding to samples included in each of the N groups in order to locate a marker for distinguishing between the N groups of samples, and to perform a differential analysis between the M groups formed by the group rearranging section, using the data corresponding to samples included in each of the M groups in order to locate a marker for distinguishing between the M groups of samples grouped according to said changed criterion for grouping. a data acquiring section configured to acquire data for each of a plurality of samples, the data representing a chromatogram or mass spectrum; an empirical information setting section configured to acquire or set a plurality of kinds of empirical information for each of the plurality of samples, the empirical information showing a property of each sample; a condition selecting section configured to allow an operator to select a condition for grouping based on first empirical information which is one of the plurality of kinds of empirical information; a group forming section configured to perform grouping of the plurality of samples into N groups based on the condition for grouping selected through the condition selecting section, where N is an integer equal to or greater than three; a group rearrangement condition specifying section configured to allow an operator to input a changed criterion for grouping to specify, for each of the N groups formed by the group forming section or for each of the samples included in each of the N groups, a condition for rearranging the N groups using second empirical information which is one of the plurality of kinds of empirical information previously set by automatically reading information from an external source or according to manual input by an operator; a group rearranging section configured to form M groups, where N>M, by selecting one or more groups from the N groups formed by the group forming section and merging the selected groups together as needed, based on the condition for rearranging the groups specified through the group rearrangement condition specifying section; and a differential analysis section configured to analyze a difference in a peak of the chromatogram or mass spectrum between a plurality of groups formed by the group forming section or the group rearranging section, using the data acquired by the data acquiring section and included in each of the groups, where the differential analysis section is configured to perform a differential analysis between the N groups formed by the group forming section, using the data corresponding to samples included in each of the N groups in order to locate a marker for distinguishing between the N groups of samples, and to perform a differential analysis between the M groups formed by the group rearranging section, using the data corresponding to samples included in each of the M groups in order to locate a marker for distinguishing between the M groups of samples grouped according to said changed criterion for grouping.