You are not using the
row
variable:
foreach (DataGridViewRow row in dataGridView2.Rows)
{
DateTime dt3 = DateTime.Parse(row.Cells["Today"].Value);
DateTime dt1 = DateTime.Parse(row.Cells["LastDate"].Value);
int s12 = (dt1 - dt3).Days;
row.Cells["RemaningDays"].Value = s12;
}