---
title: COVAR – หา Covariance (เก่า)
url: https://www.thepexcel.com/functions/excel/compatibility/covar/
type: function-explainer
program: Excel
syntax: "=COVAR(array1, array2)"
date: 2025-12-02
updated: 2026-05-31
scores:
  popularity: 2
  difficulty: 3
  usefulness: 2
---

# COVAR – หา Covariance (เก่า)

> ฟังก์ชันเก่าสำหรับคำนวณความแปรปรวนร่วม (Covariance) ระหว่างข้อมูลสองชุด เพื่อวัดความสัมพันธ์ระหว่างต

## คำอธิบาย

ฟังก์ชันเก่าสำหรับคำนวณความแปรปรวนร่วม (Covariance) ระหว่างข้อมูลสองชุด เพื่อวัดความสัมพันธ์ระหว่างตัวแปร ควรใช้ COVARIANCE.P แทน

## Syntax

```excel
=COVAR(array1, array2)
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| array1 | Yes | Range |  | ช่วงข้อมูลชุดแรก |
| array2 | Yes | Range |  | ช่วงข้อมูลชุดที่สอง |

## ตัวอย่าง

### 1. หาความสัมพันธ์ (Legacy)

```excel
=COVAR({1,2,3}, {1,3,5})
```

**ผลลัพธ์:** `1.33...`

คำนวณความแปรปรวนร่วมแบบประชากร (Population)

### 2. ข้อมูลสวนทางกัน

```excel
=COVAR({1,2,3}, {5,3,1})
```

**ผลลัพธ์:** `-1.33...`

ค่าติดลบแสดงว่าข้อมูลสองชุดมีความสัมพันธ์แบบสวนทาง

### 3. เทียบกับฟังก์ชันใหม่

```excel
=COVARIANCE.P(...)
```

**ผลลัพธ์:** `เท่ากัน`

ควรใช้ COVARIANCE.P แทน

## ฟังก์ชันที่เกี่ยวข้อง

- [CORREL – หาค่าสหสัมพันธ์ (Correlation Coefficient)](https://www.thepexcel.com/functions/excel/statistical/correl/)
- [COVARIANCE.P – หาความแปรปรวนร่วม (ประชากร)](https://www.thepexcel.com/functions/excel/statistical/covariance-p/)
- [COVARIANCE.S – หาความแปรปรวนร่วม (กลุ่มตัวอย่าง)](https://www.thepexcel.com/functions/excel/statistical/covariance-s/)
- [PEARSON – หาค่าสหสัมพันธ์ Pearson](https://www.thepexcel.com/functions/excel/statistical/pearson/)
- [SLOPE – หาความชันของเส้นถดถอย](https://www.thepexcel.com/functions/excel/statistical/slope/)
- [VAR – คำนวณความแปรปรวนของกลุ่มตัวอย่าง (Legacy)](https://www.thepexcel.com/functions/excel/compatibility/var/)

## แหล่งข้อมูลเพิ่มเติม

- [Official Documentation](https://support.microsoft.com/en-us/office/covar-function-50479552-2c03-4daf-bd71-a5ab88b2db03) _(official)_
- [ExcelJet](https://exceljet.net/excel-functions/excel-covar-function) _(guide)_

---

_Source: [https://www.thepexcel.com/functions/excel/compatibility/covar/](https://www.thepexcel.com/functions/excel/compatibility/covar/)_
