IPC-2141A simplified formulas (copper thickness T = 0, surface microstrip) are used.
Top = cross-section of the pair (W, S, H, substrate) / Bottom = Z_diff versus S/H (red dot = current point, dashed = USB 90 ohm / HDMI 100 ohm targets)
For a surface microstrip differential pair, first compute the single-ended characteristic impedance Z_0, then apply a correction for the coupling between the two traces to obtain the differential impedance Z_diff.
Single-ended microstrip Z_0 (IPC-2141 simplified form, copper thickness T = 0). H is the substrate height, W the trace width, ε_r the dielectric constant:
$$Z_0 = \frac{87}{\sqrt{\varepsilon_r + 1.41}}\,\ln\!\left(\frac{5.98\,H}{0.8\,W}\right)$$Differential impedance Z_diff. S is the spacing between the two traces:
$$Z_\text{diff} = 2\,Z_0\,\bigl(1 - 0.48\,e^{-0.96\,S/H}\bigr)$$Odd-mode Z_odd and even-mode Z_even:
$$Z_\text{odd} = \tfrac{1}{2}\,Z_\text{diff},\qquad Z_\text{even} = Z_0\,\bigl(1 + 0.48\,e^{-0.96\,S/H}\bigr)$$USB 2.0/3.x targets Z_diff = 90 ohm; HDMI, SATA, PCIe and 1000BASE-T target Z_diff = 100 ohm.