The
p‐rank of a Steiner triple system (STS)
B is the dimension of the linear span of the set of characteristic vectors of blocks of
B, over GF
(
p
). We derive a formula for the number of different STSs of order
v and given
2‐rank
r
2,
r
2
goodbreakinfix<
v, and a formula for the number of STSs of order
v and given
3‐rank
r
3,
r
3
goodbreakinfix<
v
goodbreakinfix−
1. Also, we prove that there are no STSs of
2‐rank smaller than
v and, at the same time,
3‐rank smaller than
v
goodbreakinfix−
1. Our results extend previous study on enumerating STSs according to the rank of their codes, mainly by Tonchev, V.A. Zinoviev, and D.V. Zinoviev for the binary case and by Jungnickel and Tonchev for the ternary case.