The calculation of betweenness centrality involves identifying all the shortest paths between pairs of nodes in a network and determining how many of these paths pass through a specific node. Mathematically, for a given node v, its betweenness centrality C_b(v) is the sum of the fraction of all-pairs shortest paths that pass through v.