For subsets in the standard symplectic space
$(\mathbb {R}^{2n},\omega _0)$
whose closures are intersecting with coisotropic subspace
$\mathbb {R}^{n,k}$
we construct relative versions of the Ekeland–Hofer capacities of the subsets with respect to
$\mathbb {R}^{n,k}$
, establish representation formulas for such capacities of bounded convex domains intersecting with
$\mathbb {R}^{n,k}$
. We also prove a product formula and a fact that the value of this capacity on a hypersurface
$\mathcal {S}$
of restricted contact type containing the origin is equal to the action of a generalized leafwise chord on
$\mathcal {S}$
.