To predict the K+ ion concentration in the blood from the ECG, We used a deep ResNet architecture, as shown in figure, attached as pdf file. The ECG data passed through three convolutional layers with different kernel sizes to accurately capture the T-wave, QRS complex, and other relevant features. These features were then processed through six sequential residual blocks. The model predicted both the continuous value of potassium and the corresponding class. We used the MIMIC IV dataset, where the ECGs and potassium levels of each subject were matched with a one-hour difference. The ECGs in the MIMIC IV dataset were recorded at a frequency of 500 Hz for 10s. For training, we used 30,000 windowed ECG data samples, each with a five-second duration, while 6,000 five-second windows were set aside for testing. We got an overall mae of 0.63 and the auc of hypo and normal is 0.81 , hyper and normal is 0.74 and hypo and hyper is 0.90 the precison of hyper class is 0.81 and hypo class is 0.70. The AUC for hypo and normal ranges is 0.81, which is better than what is reported in other studies. the AUC for hypo and hyperkalemia is 0.9, indicating it effectively differentiates between hypo and hyper conditions.