Method and software are provided to format a probability index that reflects where an electroencephalogram (EEG) pattern lies within the spectrum of wakefulness to deep sleep, which employs a computer/microprocessor that performs frequency domain analysis of one or more discrete sections (Bins) of the EEG to determine the EEG power at specified frequencies, optionally calculates the total power over specified frequency ranges, assigns a rank to the power at each frequency, or frequency range, assigns a code to the Bin that reflects the ranking of the different frequencies or frequency ranges, and determines an index that reflects where said EEG pattern within said Bin(s) lies within the spectrum of wakefulness to deep sleep by use of a reference source, such as a look-up table or other suitable decoding instrument. The reference source is obtained by calculating the probability of Bins with different codes occurring in epochs scored as awake or asleep in reference files scored by one or more expert technologists or by an automatic scoring software.