  An important measure of signed graphs is the line index of balance which has
several applications in many fields. However, this graph-theoretic measure was
underused for decades because of the inherent complexity in its computation
which is closely related to solving NP-hard graph optimisation problems like
MAXCUT. We develop new quadratic and linear programming models to compute the
line index of balance exactly. Using the Gurobi integer programming
optimisation solver, we evaluate the line index of balance on real-world and
synthetic datasets. The synthetic data involves Erd\H{o}s-R\'{e}nyi graphs,
Barab\'{a}si-Albert graphs, and specially structured random graphs. We also use
well known datasets from the sociology literature, such as signed graphs
inferred from students' choice and rejection as well as datasets from the
biology literature including gene regulatory networks. The results show that
exact values of the line index of balance in relatively large signed graphs can
be efficiently computed using our suggested optimisation models. We find that
most real-world social networks and some biological networks have small line
index of balance which indicates that they are close to balanced.
