We use the dispersion measure (DM) and redshift measurements of 24 localized fast radio bursts (FRBs) to compare cosmological models and investigate the Hubble tension. Setting a flat prior on the DM contribution from the Milky Way’s halo,
DM
halo
MW
∈
[
5
,
80
]
pc
cm
−
3
, the best fit for flat ΛCDM is obtained with a Hubble constant
H
0
=
95.8
−
9.2
+
7.8
km
s
−
1
Mpc
−
1
and a median matter density Ωm ≈ 0.66. The best fit for the R
h = ct universe is realized with
H
0
=
94.2
−
6.2
+
5.6
km
s
−
1
Mpc
−
1
. We emphasize that the H
0 measurement depends sensitively on the
DM
halo
MW
prior. Since flat ΛCDM has one more free parameter, R
h = ct is favored by the Bayesian Information Criterion (BIC) with a likelihood of ∼73% versus ∼27%. Through simulations, we find that if the real cosmology is ΛCDM, a sample of ∼1150 FRBs in the redshift range 0 < z < 3 would be sufficient to rule out R
h = ct at a 3σ confidence level, while ∼550 FRBs would be necessary to rule out ΛCDM if the real cosmology is instead R
h = ct. The required sample sizes are different, reflecting the fact that the BIC imposes a severe penalty on the model with more free parameters. We further adopt a straightforward method of deriving an upper limit to H
0, without needing to consider the poorly known probability distribution of the DM contributed by the host galaxy. The theoretical DM contribution from the intergalactic medium (DMIGM) at any z is proportional to H
0. Thus, requiring the extragalactic DMext to be larger than DMIGM delimits H
0 to the upside. Assuming flat ΛCDM, we have H
0 < 89.0 km s−1 Mpc−1 at a 95% confidence level.