you multiply the Amp Hours by the voltage to get the standardised WH. Each mile uses on average about 10WH. The last 20% of the capacity is unpleasant to use because the voltage is close to the protection cutout, you should not count on it.
For example, if your battery is a 36V battery, 36V * 5.2AH = 187WH.
80% of that is useable, the last 20% can be used but unpleasant.
You can do about 15-16 good miles with it, with 3 more on low assist.
Another unpleasant side effect of such a low capacity battery is how much power you can pull on the battery when climbing a steep hill.
The maximum current draw is usually given as 1.5C to 2C. C= capacity/H, 5.2A *1.5=8A in your case. It's not much available to climb a steep hill with. A minimum 8AH is recommended for an e-bike.