How this calculation works
Measure the fraction of possible edges present in a simple undirected graph.
Density = edges divided by n(n−1)/2A worked example
Eight vertices have 28 possible edges, so twelve edges give density 12/28.
Good to know
Parallel edges and self-loops are excluded.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Measure the fraction of possible edges present in a simple undirected graph.
The primary result is labeled “Density”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
Parallel edges and self-loops are excluded.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
Eight vertices have 28 possible edges, so twelve edges give density 12/28.
Which rule does this calculator apply?
Density = edges divided by n(n−1)/2