This calculator helps you measure the asymmetry of your data distribution. It calculates the skewness coefficient, standard error, and statistical significance, helping you understand whether your data leans more towards one side. It also provides the test statistic and p-value for the skewness test. The calculator also generates a histogram with density histogram with density estimation to visualize the distribution of your data.
Need a quick calculation? Enter your numbers below:
Skewness is a measure of asymmetry in a probability distribution. It quantifies how much a distribution deviates from perfect symmetry, where data is evenly distributed around the mean.
Pearson's First Coefficient of Skewness (Moment Coefficient):
Based on the third standardized moment of the distribution. More sensitive to extreme values.
Pearson's Second Coefficient of Skewness (Median Skewness):
Based on the relationship between mean, median, and standard deviation. More robust to outliers.
Where:
Note: While both coefficients measure skewness, they can give slightly different results. The First Coefficient is more commonly used in statistical software but can be more sensitive to outliers. The Second Coefficient is simpler to interpret and more robust to extreme values.
The following examples illustrate how skewness affects the shape of a distribution and the relationships between mean, median, and mode. Hover over the charts to explore the data points.
Skewness ≈ 0
Relationship: Mean ≈ Median ≈ Mode
The distribution is balanced around the mean, with similar tails on both sides.
0.5 < Skewness ≤ 1.0
Relationship: Mean > Median > Mode
The distribution has a moderate tail extending to the right.
Skewness > 1.0
Relationship: Mean >> Median > Mode
The distribution has a long tail extending far to the right.
-1.0 ≤ Skewness < -0.5
Relationship: Mean < Median < Mode
The distribution has a moderate tail extending to the left.
Skewness < -1.0
Relationship: Mode > Median >> Mean
The distribution has a long tail extending far to the left.
While skewness measures the asymmetry of a distribution, kurtosis measures its "tailedness" or the heaviness of the tails relative to a normal distribution.
When analyzed together, skewness and kurtosis provide a more complete picture of your distribution's shape. For example, a distribution can be both positively skewed (asymmetric to the right) and leptokurtic (heavy-tailed with many outliers).
Use the skewness() function from the moments package to calculate skewness.
library(tidyverse)
library(moments)
tips <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/tips.csv")
skewness(tips$tip) # 1.456427
# histogram with density
ggplot(tips, aes(x = tip)) +
geom_histogram(aes(y = after_stat(density)), binwidth = 0.5, fill = "darkblue", alpha = 0.7) +
geom_density(adjust=1.5, color = "red", linewidth = 1) + # the adjust parameter controls the smoothness of the density curve
geom_vline(aes(xintercept = mean(tip)),
linetype = "dashed",
color = "blue",
size = 1) +
geom_vline(aes(xintercept = median(tip)),
linetype = "dotted",
color = "green",
size = 1) +
labs(title = "Histogram and Density of Tip Amounts",
x = "Tip Amount ($)",
y = "Density") +
theme_minimal()Python offers multiple libraries for calculating skewness, with SciPy and Pandas being the most common.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import scipy.stats as stats
import seaborn as sns
# Create some sample data
data = np.random.lognormal(0, 0.8, 1000) # Log-normal distribution (positive skew)
# Method 1: Using scipy.stats
skewness_scipy = stats.skew(data)
print(f"Skewness (SciPy): {skewness_scipy:.4f}")
# Method 2: Using pandas
df = pd.DataFrame({'values': data})
skewness_pandas = df['values'].skew()
print(f"Skewness (Pandas): {skewness_pandas:.4f}")
# Visualize with histogram and density plot
plt.figure(figsize=(10, 6))
sns.histplot(data, kde=True, stat="density")
plt.axvline(np.mean(data), color='red', linestyle='dashed', linewidth=2, label=f'Mean: {np.mean(data):.2f}')
plt.axvline(np.median(data), color='green', linestyle='dotted', linewidth=2, label=f'Median: {np.median(data):.2f}')
plt.title(f'Positively Skewed Distribution (Skewness: {skewness_scipy:.4f})')
plt.legend()
plt.show()There are two ways to calculate skewness in Excel:
The SKEW function calculates the skewness of a distribution based on a sample.
=SKEW(A2:A100)This calculator helps you measure the asymmetry of your data distribution. It calculates the skewness coefficient, standard error, and statistical significance, helping you understand whether your data leans more towards one side. It also provides the test statistic and p-value for the skewness test. The calculator also generates a histogram with density histogram with density estimation to visualize the distribution of your data.
Need a quick calculation? Enter your numbers below:
Skewness is a measure of asymmetry in a probability distribution. It quantifies how much a distribution deviates from perfect symmetry, where data is evenly distributed around the mean.
Pearson's First Coefficient of Skewness (Moment Coefficient):
Based on the third standardized moment of the distribution. More sensitive to extreme values.
Pearson's Second Coefficient of Skewness (Median Skewness):
Based on the relationship between mean, median, and standard deviation. More robust to outliers.
Where:
Note: While both coefficients measure skewness, they can give slightly different results. The First Coefficient is more commonly used in statistical software but can be more sensitive to outliers. The Second Coefficient is simpler to interpret and more robust to extreme values.
The following examples illustrate how skewness affects the shape of a distribution and the relationships between mean, median, and mode. Hover over the charts to explore the data points.
Skewness ≈ 0
Relationship: Mean ≈ Median ≈ Mode
The distribution is balanced around the mean, with similar tails on both sides.
0.5 < Skewness ≤ 1.0
Relationship: Mean > Median > Mode
The distribution has a moderate tail extending to the right.
Skewness > 1.0
Relationship: Mean >> Median > Mode
The distribution has a long tail extending far to the right.
-1.0 ≤ Skewness < -0.5
Relationship: Mean < Median < Mode
The distribution has a moderate tail extending to the left.
Skewness < -1.0
Relationship: Mode > Median >> Mean
The distribution has a long tail extending far to the left.
While skewness measures the asymmetry of a distribution, kurtosis measures its "tailedness" or the heaviness of the tails relative to a normal distribution.
When analyzed together, skewness and kurtosis provide a more complete picture of your distribution's shape. For example, a distribution can be both positively skewed (asymmetric to the right) and leptokurtic (heavy-tailed with many outliers).
Use the skewness() function from the moments package to calculate skewness.
library(tidyverse)
library(moments)
tips <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/tips.csv")
skewness(tips$tip) # 1.456427
# histogram with density
ggplot(tips, aes(x = tip)) +
geom_histogram(aes(y = after_stat(density)), binwidth = 0.5, fill = "darkblue", alpha = 0.7) +
geom_density(adjust=1.5, color = "red", linewidth = 1) + # the adjust parameter controls the smoothness of the density curve
geom_vline(aes(xintercept = mean(tip)),
linetype = "dashed",
color = "blue",
size = 1) +
geom_vline(aes(xintercept = median(tip)),
linetype = "dotted",
color = "green",
size = 1) +
labs(title = "Histogram and Density of Tip Amounts",
x = "Tip Amount ($)",
y = "Density") +
theme_minimal()Python offers multiple libraries for calculating skewness, with SciPy and Pandas being the most common.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import scipy.stats as stats
import seaborn as sns
# Create some sample data
data = np.random.lognormal(0, 0.8, 1000) # Log-normal distribution (positive skew)
# Method 1: Using scipy.stats
skewness_scipy = stats.skew(data)
print(f"Skewness (SciPy): {skewness_scipy:.4f}")
# Method 2: Using pandas
df = pd.DataFrame({'values': data})
skewness_pandas = df['values'].skew()
print(f"Skewness (Pandas): {skewness_pandas:.4f}")
# Visualize with histogram and density plot
plt.figure(figsize=(10, 6))
sns.histplot(data, kde=True, stat="density")
plt.axvline(np.mean(data), color='red', linestyle='dashed', linewidth=2, label=f'Mean: {np.mean(data):.2f}')
plt.axvline(np.median(data), color='green', linestyle='dotted', linewidth=2, label=f'Median: {np.median(data):.2f}')
plt.title(f'Positively Skewed Distribution (Skewness: {skewness_scipy:.4f})')
plt.legend()
plt.show()There are two ways to calculate skewness in Excel:
The SKEW function calculates the skewness of a distribution based on a sample.
=SKEW(A2:A100)