@badrukk It varies between books and novels, but in general:
Frigates: Bigger than destroyers but smaller than light cruisers
Lighter Cruisers: 3km
Grand Cruisers: Bigger than CR but smaller than BB
I ddn't put in a lot of ship classes here, and the transports are easily some of the biggest, but the battleship category is the one that fluctuates the most. Even amongst imperials you have the retribution class (8km), the battlebarges (sometimes 12km) the infernus class (15km) the gloriana class (26km) and the furious abyss class (30+km), and other races vary alot to, such as there being hive ships the size of a cruiser, to none being smaller than 32km, to some being large enough to eat a moon in a single nom depending on the hive/splinter fleet. For Imperials/Chaos/Aeldari/orks/tau/druhakri they mostly follow the mentioned size patterns. Other factions can be weird (like the Fra'al and their "battlecruisers or bust" doctrine) when it comes to size, but these main factions are mostly the same, if only because two use the same ship base and the third uses the hulks of those two. The necrons and nids are the big outliers among the main races. Nid ships are all custom builds, so standardization is not a thing and they grow with age and can live more or less forever, so good luck pinning down their sizes. We don't know any of the necron ship sizes besides the Cairn, but they have much smaller fighters than other races because their weaponry is so damn potent and engines small they can just slap them on tiny things for extra dodging/speed with no effectiveness loss (infact, their bikes are in fact small fighters retrofitted for ground combat, and the others also all have different void loadouts) but their only known size, the battleship, is 15 by about 20km, which is enormous. Most other race's ships are thin, but not theirs, so they can fit a lot more guns on but its flat so it has a narrow side back and frontal profile. Going solely off their BB, the other ships might be bigger on average as well, but without numbers none can say.
retribution class (8km)
Where does it come from
All said it 8km but no one can provide solid source on it
The Lexicanum got that particular stat from the Battlefleet Gothic resources from GW themselves. You'll find they tend not to post stuff that cannot be verified.
@badrukk It varies heavily, even within cannon, given the nature of what the Imperium actually is (essentially a vast, loose association of empires, protectorates, vassals and dominions; directed by a semi-centralised government and unified state-enforced religious practice).
As such the ships produced by the Imperium can vary a lot in scale, you can treat the many many conflicting size estimates and stated 'cannon' as true.
Common wisdom, however, states that destroyers and frigates are 1.5-2 KM long, Light Cruisers are around 4 KM long, Line Cruisers/ Battle Cruisers around 5 KM, Heavy Cruisers around 6 KM, Grand Cruisers around 7 KM and battleships around 8KM (although battleships in particular can be massively larger than that in some calculations, I put that down to ego, and the role they are meant to fill). Those are treated as the average, and the most common sizes, to give an idea of size in relation to each type of ship.
There is a lot of GW sources or conflicting sources, but generally these are mostly used:
Escort: 1-2km, though there was 30km Cobra in an old novel.
Light Cruisers: Mostly no info, but 3-4 km sounds accurate.
Cruisers/BattleC/HeavyC: 3-4-5-6-7-8 kms are all not uncommon.
Grand Cruiser: 7-13 km had been mentioned somewhere.
Battleship: 6-8-12-16km, but there has been a "Smaller than 2km hiveship" in an old novel.
Battlebarges are usually battleship sized, and Strike Cruiser maybe between LC and Cruisers.
Transports are the weirdest bunch, with 1km to 3km to 6km to 15km to 60km for the biggest conveyors.
Basically it is all over the place.