Skip to content
ENExplore Calculators

PCA Components For Variance Calculator

Work out pca components for variance instantly with clear inputs, formula shown and shareable results.

About PCA Components For Variance Calculator

PCA orders components by the variance each explains, so retaining a target share of variance is a cumulative-sum problem: add the ratios in order until they cross the threshold. The count where that happens is the dimensionality you can reduce to, and the components dropped are the directions along which the data barely varies — often noise rather than signal.

Formula

Cumulative variance

k = smallest k such that (sum of the first k explained variance ratios) / total >= target

Worked example

With the default values below, PCA Components For Variance Calculator returns Components to retain of 7. Change any input above and every figure here is recalculated in your browser.

Inputs used

Explained variance ratios in order
0.42, 0.21, 0.13, 0.08, 0.05, 0.04, 0.03, 0.02, 0.01, 0.01
Variance to retainaccepts 1–100 %
95 %

Results

Components to retain
7
Variance captured
96.00%
Components discarded
3
Variance discarded
4.00%

Step by step

  1. 1Values used
  2. 2Cumulative variance
  3. 3Components to retain= 7
  4. 4Variance captured= 96.00
  5. 5Components discarded= 3
  6. 6Variance discarded= 4.00

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Should features be scaled before PCA?

Yes, unless every feature already shares a unit. PCA maximises variance, so an unscaled feature measured in thousands will dominate the first component regardless of its relevance.

Is 95 percent the right target?

It is a convention, not a rule. For visualisation two or three components suffice; for a downstream model, tune the component count against validation performance instead.

PCA Components For Variance Calculator | Calcrivo