In the setting of metric measure spaces satisfying the doubling condition and the (1, p)-Poincaré inequality, we prove a metric analogue of the Bourgain–Brezis–Mironescu formula for functions in the Sobolev space $$W^{1,p}(X,d,\nu )$$
W
1
,
p
(
X
,
d
,
ν
)
, under the assumption that for $$\nu $$
ν
-a.e. point the tangent space in the Gromov–Hausdorff sense is Euclidean with fixed dimension N.