Hey, I'll tell you what I do. I'm building an eBike myself.

When I design a battery, I start with the power requirement. In the case of an eBike motor, generally they'll give you Watts and Volts. More tricky is how long do you want the battery to last per charge? So for example, let's say a 48V 1000W motor, and we want to have it last for an hour at full power. We can then figure out the characteristics thatthe battery needs to have:

48V

1000W

20.8A =1000W/48V

1 Hour

20.8 Ah =20.8A*1h

998.4Wh =20.8Ah*48V

Next we need to know the capability of each cell I'll be using. Easy if you buy a bunch of the same cell, you can look up the data on the forum database here. More difficult if you have a bunch of different cells. You'll have to find an average or think conservatively. For example, how many Amps can each cell give, and how many Ah does each have. Just remember putting cells in Series, you'll add the Volts, but the Amps and Ah don't add up. Each cell will experience the total current in the Series, and the capacity is an average of what each cell has. And putting them in parallel, you'll add the Amps each cell can do, and add up the capacity of each cell. But the Voltage will be the same.

Anyway, let's say we have cells at 3.7V (4.2-2.8V) 2Ah, and can deliver 1A safely. We can use that to determine first, how many in series:

48V/3.7V=12.97 cells.

Of course, you can't have 12.97 cells, so round up to 13 cells. Motors, and motor controllers, generally operate over a range of Voltages, so you might compare the range of the motor/controller to that of the battery you might make. For example:

12s = 50.4V-33.6V

13s = 54.6V-36.4V

14S = 58.8V-39.2V

Let's say 13s ends up matching best. Next, we need to figure out how many in parallel we need. The two factors that will determine this is Wh, and Amps. Watt-hours are interesting, because they add up whether you put cells in series or parallel. So from above we know we need 998.4Wh total. We can figure out the Wh of each cell:

3.7V(nominal)*2Ah= 7.4Wh

998.4Wh/7.4Wh= 134.9 cells total.

Again, we can't have 0.9 of a cell so round up to 135 cells. So we can figure how many to put in parallel because we know how many we'll have in series already:

135/13s= 10.4p (Round up) 11p

That's just for Wh though. Still need to know how many are needed in parallel to satisfy the Amps:

20.8A(total)/2A(per cell)= 10.4p (Round up) 11p.

That's weird, that they match in this example. For me they usually don't and I have to choose the higher number. But in this case, 13s11p. Notice that the total number of cells, because we had to round up, is now 143 cells.

You can also check your work by comparing the battery you've just designed to the original specs you needed:

48V and 54.6V-36.4V Yep!

20.8A and 22A (11p*2A/cell) Yep!

998.4Wh and 1,058.2Wh (143cells*7.4Wh/cell) Yep!

I hope that makes sense. I put all this in a spreadsheet so every time I design a new battery, it does most of the work for me.