This is usually one of the first questions from beginners as one of the most difficult to answer and most of the time being "does not matter" or "depends on the scale"
One of the common methods used is from Black Powder, with 40x40 for Infantry (4 28mm models) or 45x40 (6 28mm models) and 50x50 for Cavalry were the amount of bases is used to to determine if it is a small, standard or large unit.
Some people also get into details here and try to be "realistic" by researching how many soldiers the specific unit had by the time of the scenario and calculate how many bases/models are needed.
And for them it is very important to have to possibility to use the correct sized unit on the table and rules that have more fixed units sizes are considered bad
But the problem here is very simple, a square base can never be realistic so it would not matter if you have an appropriate sized unit to represent the historical battalion /regiment in numbers if the footprint is everything but correct.
to get into details:
taking the french as prime example, they were organised in 3 ranks and a company was ~130 meters wide while only ~2,5 meters deep (without Officers that were further behind)
going with 28mm being 1:56, 2,5cm (1 standard inch) would represent 140m
so the classic 40x40 square base per company fails to represent the historical 3 ranks for french, as well as the ratio of width to depth
45x15mm with 1 rank and 1 base being 1 company (6 bases per battalion) or even going smaller with 1 model being 1 company (3 bases 40x15 per battalion) represents a historical formation much more accurately even with the number of models not being the exact value of the historical unit by that time scaled down to 1:25.
and looking closer to some division or army level games, 60x30 or 60x40 is often the sized used for a more historical ration between width and depth instead of trying to get a historical model ratio on the table
And this also flows into another point, high entry level because of the high model count needed, because the standard suggestion for Black Powder gets you 24 models per unit and you need many of them
other games that are aiming for beginner are also using the
BP basing for compatibility reasons, but half the amount of bases per unit
However, going with a more realistic approach for the basing and take gaming into account, as 15 deep bases with 1 rank or 30 deep bases with 2 ranks might not be the best for shooting or attacking models but let you start with low amount of models while your are still able to play against other people (and can be combined to make larger units later if needed)
As the most important part for base sizes in nearly all Napoleonic rules as that the width of the Line is similar for all players while the depth does not matter (so 6 40x15mm bases and 12 models per unit is perfectly fine for Black Powder)
but one wants the units to look good, and how to handle different nations as the mass units of Austria should look different to British Rifles?
60x45mm (for whatever reason) is a common base size, as well as 60x30
This give the possibility to change the amount of models to represent different types of units or nations, like having 2-4 models for Skirmishers, 4-6 models for line infantry (4 models on 60x30, 6 on 60x45) or 8 models for the large regiments Austria used (60x45).
Same for Cavalry as 2 models on 60x45 for light and 3 for heavy cavalry is possible
and low amount of models can still look good as
Battle Brush Sigur demonstrates
TL;DR:
My personal suggestion to start into Napoleonics is to skip the classic Black Powder Bases (or any suggestion for square bases no matter the scale) and go for 60mm wide bases and either 25-30mm deep for 1 rank if you start on a budget or want to keep the model count low or with 45-50mm deep for 2 ranks (4-8 models per base) and use 4 bases per unit
this way you can get good looking units, are compatible with nearly all rules (even the larger army level ones like Blücher) and don't need 36-48 models for (large) units