As the popularity of wireless sensor networks (WSNs) is rapidly expanding across businesses and industries, we must make everything around us more intelligent and informative. In such networks, sensor nodes (SNs) serve as the WSN's eyes, obtaining data about various environments and conditions, while the base station (or Sink) serves as the WSN's brain, analyzing the acquired data and making decisions. However, on the one hand, the large volume of data collected by the SNs consumes the SNs' limited energy and complicates data analysis at the sink for decision making. In this article, we present a data prediction model based on the stepwise data regression method for handling large amounts of data obtained by cluster-based WSNs. The prediction model is built stepwise data regression method that is implemented at both tiers of each cluster: cluster member nodes and Cluster Heads; and is compatible with both homogeneous and heterogeneous network setups. In intracluster data transmissions, the proposed data prediction model employs a two-buffer stepwise data regression method to synchronize the sensed and predicted data intending to reduce the cumulative errors from continuous predictions. The performance of the proposed work is examined by extensive simulations on real sensor data collected from several applications and is also compared with CPMDC (Diwakaran et al. in J Supercomput 75:3302–3316, 2019) and TDPA (Sinha and Lobiyal in Wirel Pers Commun 84:1325–1343, 2015) models. The proposed model proved to be very energy efficient, with improved data prediction accuracy, increased network lifetime, and more successful data predictions while sustaining an acceptable data accuracy, and improved network lifetime when compared with CPMDC (Diwakaran et al. 2019) and TDPA (Sinha and Lobiyal 2015) models. respectively.