The energy of an arbitrary graphene edge, from armchair (A) to zigzag (Z) orientation, is derived in analytical form. It contains a "chemical phase shift" determined by the chemical conditions at the edge. Direct atomistic computations support the universal nature of the relationship, definitive for graphene formation, and shapes of the voids or ribbons. It has further profound implications for nanotube chirality selection and possibly control by chemical means, at the nucleation stage.