I would start by deciding how many miles of range you want to get out of your pack.
Also make an educated guess on how much power you want (for acceleration and top speed).
For range: you can guestimate ~25Wh/mile. (For moderate riding, search people’s measurements)
So, for 20mile range you’d need 500Wh.
Now, you get to this number by:
Wh = Pack voltage (V) * Pack Capacity (Ah)
For a 10s5p Samsung 30Q pack that would be:
Pack voltage = 10 (series)* 3.6V (cell nominal voltage)
Pack Capacity = 5 (parallel) * 3Ah (cell capacity)
That gives us 36V * 15Ah = 540Wh
You will not want to drain your batteries entirely,
and capacity is lower when used at high discharge currents, soo you will have a slightly lower real world range.
You can use the same logic for Lipos.