Maths & numbers

Simple graph edge density calculator

Measure the fraction of possible edges present in a simple undirected graph.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Measure the fraction of possible edges present in a simple undirected graph.

THE FORMULADensity = edges divided by n(n−1)/2

A 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.

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

Find your calculator

Start typing to explore the library.