Disclosed is a method and system for detecting outliers in real-time for a univariate time-series signal. The system may receive the univariate time-series signal, comprising a plurality of datasets, from a data source. The system may compute a standard deviation of a dataset of the plurality of datasets. Subsequently, the system may compute the optimal sample block size and the critical sample size of the dataset. Further, the system may determine the optimal operational block size of the dataset. The system may segment the plurality of datasets into blocks based upon the optimal operational block size. The system may detect the outliers by performing an outlier detection technique on the blocks, thereby ensuring improved execution time while minimally affecting precision and accuracy of the outcome of the outlier detection method.