Use this code
private void dataGridView1_CellLeave(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 1)
{
dataGridView1.Rows[e.RowIndex].Cells[2].Value = Convert.ToDouble(dataGridView1.Rows[e.RowIndex].Cells[0].Value) * Convert.ToDouble(dataGridView1.Rows[e.RowIndex].Cells[1].Value);
}
}