The commutator length clG(g) of an element g ∈ [G, G] in the commutator subgroup of a group G is the least number of commutators needed to express g as their product.If G is a non-abelian free groups, then given an integer n ∈ N and an element g ∈ [G, G] the decision problem which determines if clG(g) ≤ n is NP-complete. Thus, unless P=NP, there is no algorithm that computes clG(g) in polynomial time in terms of |g|, the wordlength of g. This statement remains true for groups which have a retract to a non-abelian free group, such as non-abelian right-angled Artin groups.We will show these statements by relating commutator length to the cyclic block interchange distance of words, which we also show to be NPcomplete.