A computer-based method for reducing or eliminating baseline drift from a biological (bio) signal includes the steps of dividing the bio signal into a plurality of shorter signals having fixed time intervals, fitting a corresponding portion of a baseline function to a baseline of a respective one of each of the shorter signals, and subtracting the baseline function from the bio signal, resulting in a bio signal with a flat baseline.