One uses the same method/formula as elongation.
When a piece fractures, the load is removed, so the elastic strain is mostly recovered.
One puts the two broken parts together, matching the fracture surface, and measures the length between the marks of the original gage length. Then use the elongation formula. This however gives the total permanent elongation which does not include the elastic component at time of failure.
The elastic component of the strain (elongation) is approximately the yield strength divided by the elastic (Young's) modulus.