Correlation Calculator

Calculate Pearson correlation coefficient between two data series

Educational purposes only. This calculator is for informational purposes and should not be considered financial, tax, or legal advice. Consult a qualified professional for personalized guidance.

Try an example:

Data Input

Both series must have the same number of values for valid correlation

Pearson Correlation Formula

r = Cov(X,Y) / (sX * sY)

r = Pearson correlation coefficient

Cov(X,Y) = Covariance of X and Y

sX, sY = Standard deviations of X and Y

Correlation Strength Guide

0.7 to 1.0Strong
0.5 to 0.7Moderate
0.3 to 0.5Weak
0 to 0.3Very Weak

Values apply to both positive and negative correlations

Calculate Correlation

Enter two data series to calculate their Pearson correlation coefficient.

How This Tool Works

Correlation Calculator

Understanding How Investments Move Together

Correlation measures the degree to which two investments move in tandem. When stocks A and B tend to rise together and fall together, they're positively correlated. When A rises while B falls, they're negatively correlated. The correlation calculator quantifies this relationship, providing crucial insights for portfolio construction and risk management.

Diversification—the foundation of prudent investing—depends entirely on correlation. Holding ten positively correlated assets provides less diversification than holding three uncorrelated ones. The calculator reveals these relationships, helping you build portfolios where holdings genuinely balance each other rather than merely appearing diverse.

Understanding correlation transforms portfolio construction from naive diversification to strategic risk management.

The Correlation Scale

Correlation ranges from -1.0 to +1.0:

+1.0 (Perfect positive correlation): Investments move identically. When one rises 5%, the other rises 5%. No diversification benefit exists—they behave as a single holding.

0 (No correlation): Movements are independent. Knowing one investment's return tells you nothing about the other. This provides meaningful diversification.

-1.0 (Perfect negative correlation): Investments move exactly opposite. When one rises 5%, the other falls 5%. Maximum hedging potential—combining them could theoretically eliminate all volatility.

Real-world correlations typically fall between these extremes. Stock pairs might show 0.6 or 0.7 correlation—moving in the same direction usually but not perfectly. Stocks and bonds often show mild negative correlation during stress periods.

The calculator produces these correlation coefficients from return data, revealing the actual relationships between your holdings.

Correlation and Diversification

The mathematics of diversification depend on correlation. Portfolio variance combines individual variances and covariances:

Portfolio Variance = Σ(weights² × variances) + Σ(weight pairs × covariances)

Lower correlation between holdings reduces the covariance term, lowering overall portfolio variance even if individual holdings remain volatile.

Consider two assets, each with 20% volatility:

CorrelationCombined Portfolio Volatility (50/50)
+1.020% (no benefit)
+0.517.3%
014.1%
-0.510%
-1.00% (perfect hedge)

The same two volatile assets produce dramatically different portfolio experiences depending on their correlation. The calculator helps you find and combine lower-correlated assets for better diversification.

Time-Varying Correlations

Correlations aren't stable—they shift over time and, critically, tend to increase during market stress. During calm periods, stocks and bonds might show -0.3 correlation, providing nice diversification. During crashes, correlations often spike as panicked selling affects all assets.

This phenomenon—correlation breakdown when you need diversification most—is one of investing's cruel ironies. The diversification you observed historically might not persist through the crisis you're trying to hedge.

The calculator can compute rolling correlations over different windows, revealing how relationships change. Recent correlations might differ significantly from longer-term averages.

Asset Class Correlation Patterns

Understanding typical correlation patterns helps evaluate whether your portfolio diversification is genuine:

Large-cap stocks to small-cap stocks: Typically 0.7-0.9. High correlation limits diversification benefit from combining them, though small-caps add some independent movement.

US stocks to international developed stocks: Typically 0.7-0.85. Globalization has increased correlations over time. International diversification provides less benefit than it once did.

Stocks to bonds: Typically -0.2 to +0.4, varying by period. The relationship has shifted over decades. During some periods, stocks and bonds move together; during others, inversely.

Stocks to gold: Typically 0.0 to +0.2. Gold provides genuine diversification from equities, with near-zero long-term correlation.

Stocks to real estate (REITs): Typically 0.5-0.7. Some diversification benefit, though less than their separate asset class status might suggest.

Building Low-Correlation Portfolios

Strategic portfolio construction seeks assets that provide desired returns with low correlations. The goal isn't minimum correlation per se—that would suggest loading up on negatively correlated assets. Rather, you want the best risk-adjusted returns achievable through thoughtful correlation management.

Start by measuring correlations between your current holdings. You might discover that five "different" stocks are actually 0.8+ correlated, providing less diversification than you assumed.

Look for genuinely uncorrelated assets to add. Alternative investments—commodities, certain hedge fund strategies, real assets—sometimes provide lower correlation to traditional stocks and bonds.

Be skeptical of correlation claims during market stress. Test correlations specifically during historical crisis periods, not just overall averages.

Correlation vs. Causation

High correlation doesn't mean one investment causes the other to move. Both might respond to a common factor—economic growth, interest rates, or investor sentiment. Understanding the underlying drivers helps predict whether correlations will persist.

Two oil company stocks might be highly correlated because oil prices drive both. That correlation is likely to persist because the shared driver remains. Two random stocks might show coincidental correlation over some period that won't persist because no fundamental link exists.

When relying on correlation for portfolio construction, consider whether the relationship has logical basis or might be spurious.

The Correlation Matrix

For portfolios with multiple holdings, a correlation matrix displays all pairwise correlations systematically. Each cell shows correlation between row and column assets, with 1.0 along the diagonal (each asset is perfectly correlated with itself).

The calculator generates correlation matrices for any number of assets, providing a comprehensive view of portfolio interdependencies.

Examine the matrix for holdings with unexpectedly high correlations—opportunities for diversification improvement—or unexpectedly low correlations—sources of existing diversification to preserve.

Practical Application

Before adding a new holding, calculate its correlation with existing holdings. If it's highly correlated with what you already own, it adds little diversification despite being a "different" investment.

Periodically recalculate correlations as relationships shift. A holding that provided diversification five years ago might be more correlated with your portfolio now.

During portfolio rebalancing, consider not just allocation percentages but correlation implications. Selling a low-correlation holding to buy a high-correlation one might reduce diversification even if sector allocations look more balanced.

Using the Calculator

Enter periodic returns (daily, monthly, or annual) for two or more investments. The calculator computes pairwise correlation coefficients and can generate a full correlation matrix for multiple assets.

For portfolio analysis, combine correlation calculations with holding weights to understand how correlations contribute to overall portfolio risk.

Compare correlations across different time windows to assess relationship stability. Correlations computed from the last year versus last five years might differ meaningfully.

Use results to identify diversification gaps and opportunities—holdings that move too closely together and potential additions that would provide genuine independence.


Correlation reveals whether your diversification is real or illusory. Holdings that look different on paper might move together in practice, while seemingly similar investments might provide surprising independence. The calculator quantifies these relationships, enabling portfolio construction based on genuine diversification rather than superficial variety.