{
  "id": "simpsons-diversity-index",
  "version": "892aa2efd413",
  "status": "published",
  "name": "Simpson’s Diversity Index Calculator",
  "question": "What is Simpson’s diversity index?",
  "summary": "Computes Simpson’s diversity index from the number of individuals of each species: Simpson’s index D, the index of diversity 1 − D and the reciprocal index 1 ÷ D, with the species count.",
  "category": "biology",
  "url": "https://www.acalculator.org/biology/simpsons-diversity-index-calculator",
  "markdown": "https://www.acalculator.org/biology/simpsons-diversity-index-calculator.md",
  "kind": "function",
  "method": "D = Σ n(n − 1) ÷ (N(N − 1)), or D = Σ (n ÷ N)² for proportions; Simpson’s index of diversity = 1 − D; reciprocal index = 1 ÷ D.",
  "assumptions": [
    "Each count is the number of individuals of one species; N is their sum and S the number of species with a count above 0.",
    "Σ n(n − 1) ÷ N(N − 1) is Simpson’s estimate from a sample (two individuals drawn without replacement); Σ p² treats the counts as proportions of the whole community and also accepts decimals.",
    "Higher 1 − D and 1 ÷ D mean more diversity; D itself is lower when diversity is higher."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "n": {
        "title": "Individuals of each species",
        "description": "How many individuals of each species were counted, separated by commas, spaces or new lines.",
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "f": {
        "title": "Formula",
        "description": "Σ n(n − 1) ÷ N(N − 1) for counts from a sample (Simpson’s estimate), or Σ p² for proportions of a whole community.",
        "type": "string",
        "enum": [
          "finite",
          "infinite"
        ]
      }
    }
  },
  "outputs": {
    "index": {
      "label": "Simpson’s index of diversity (1 − D)",
      "description": "The chance that two individuals picked at random are different species.",
      "format": "number"
    },
    "d": {
      "label": "Simpson’s index (D)",
      "description": "The chance that two individuals picked at random are the same species.",
      "format": "number"
    },
    "reciprocal": {
      "label": "Simpson’s reciprocal index (1 ÷ D)",
      "description": "One divided by D: from 1 up to the number of species.",
      "format": "number"
    },
    "richness": {
      "label": "Species (S)",
      "description": "The number of species with a count above 0.",
      "format": "integer"
    },
    "total": {
      "label": "Total (N)",
      "description": "The sum of all the counts.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "n": "25, 15, 40, 20",
      "f": "finite"
    },
    "outputs": {
      "index": 0.7222222222222222,
      "d": 0.2777777777777778,
      "reciprocal": 3.6,
      "richness": 4,
      "total": 100
    },
    "text": "Simpson’s index of diversity is 0.722222, with D = 0.277778, for 4 species."
  },
  "examples": [
    {
      "given": {
        "n": [
          0.25,
          0.15,
          0.4,
          0.2
        ],
        "f": "infinite"
      },
      "expect": {
        "d": 0.285,
        "index": 0.715,
        "reciprocal": 3.508771929824561,
        "richness": 4
      },
      "source": "NIST, Dataplot Reference Manual, SIMPSON DIVERSITY INDEX (D = Σ (f_i ÷ n)², or Σ p_i² for proportions; lower values mean more diversity; Simpson 1949; proportions 0.25, 0.15, 0.40, 0.20 give 0.2850000), https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/simpson.htm (retrieved 2026-10-18); hand calculation in content.mdx: 0.0625 + 0.0225 + 0.16 + 0.04 = 0.285"
    },
    {
      "given": {
        "n": [
          25,
          15,
          40,
          20
        ],
        "f": "finite"
      },
      "expect": {
        "d": 0.2777777777777778,
        "index": 0.7222222222222222,
        "reciprocal": 3.6,
        "richness": 4,
        "total": 100
      },
      "source": "Simpson, E. H. (1949), Measurement of diversity, Nature 163, 688 (the index Σ π_i² and its estimate Σ n_i(n_i − 1) ÷ (N(N − 1))), https://doi.org/10.1038/163688a0; Tiffeau-Mayer, A. (2024), Unbiased estimation of sampling variance for Simpson’s diversity index, arXiv:2310.03439, Eqs. 1 and 2 (the probability that two individuals drawn at random are the same species, Σ p_i², and Simpson’s estimate Σ n_i(n_i − 1) ÷ (N(N − 1)) for pairs drawn without replacement), https://arxiv.org/abs/2310.03439 (retrieved 2026-10-18); hand calculation in content.mdx: 2,750 ÷ 9,900 = 0.27778"
    },
    {
      "given": {
        "n": [
          10,
          0,
          10
        ],
        "f": "finite"
      },
      "expect": {
        "d": 0.47368421052631576,
        "index": 0.5263157894736842,
        "reciprocal": 2.111111111111111,
        "richness": 2
      },
      "source": "Simpson, E. H. (1949), Measurement of diversity, Nature 163, 688 (the index Σ π_i² and its estimate Σ n_i(n_i − 1) ÷ (N(N − 1))), https://doi.org/10.1038/163688a0; hand calculation in content.mdx: (90 + 90) ÷ (20 × 19) = 180 ÷ 380"
    },
    {
      "given": {
        "n": [
          1,
          1,
          1
        ],
        "f": "finite"
      },
      "expect": {
        "d": 0,
        "index": 1,
        "richness": 3
      },
      "source": "Simpson, E. H. (1949), Measurement of diversity, Nature 163, 688 (the index Σ π_i² and its estimate Σ n_i(n_i − 1) ÷ (N(N − 1))), https://doi.org/10.1038/163688a0; hand calculation in content.mdx: Σ n(n − 1) = 0, so D = 0 and 1 ÷ D has no value"
    }
  ],
  "sources": [
    "Simpson, E. H. (1949), Measurement of diversity, Nature 163, 688. The index Σ π_i², the chance that two individuals taken at random belong to the same group, and its estimate Σ n_i(n_i − 1) ÷ (N(N − 1)) from a sample. https://doi.org/10.1038/163688a0 (reprinted with permission at https://people.wku.edu/charles.smith/biogeog/SIMP1949.htm)",
    "NIST, Dataplot Reference Manual, SIMPSON DIVERSITY INDEX: D = Σ (f_i ÷ n)² for counts, or Σ p_i² for proportions; lower values indicate more diversity; example with proportions 0.25, 0.15, 0.40, 0.20 gives 0.2850000. https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/simpson.htm (retrieved 2026-10-18)",
    "Tiffeau-Mayer, A. (2024), Unbiased estimation of sampling variance for Simpson’s diversity index, arXiv:2310.03439: the index Σ p_i² (Eq. 1) and Simpson’s unbiased estimate Σ n_i(n_i − 1) ÷ (N(N − 1)) for pairs drawn without replacement (Eq. 2). https://arxiv.org/abs/2310.03439 (retrieved 2026-10-18)"
  ],
  "related": [
    "shannon-diversity-index",
    "hardy-weinberg",
    "percentage"
  ],
  "changelog": []
}
