Short answer
Work out two numbers first: your peak AC load, including motor starting surges, and your daily energy consumption. Size the generator to the real load rather than the largest figure in the brochure — a genset that runs lightly loaded for hours will foul. Log a few typical days aboard before buying anything.
You will need: Clamp meter or energy monitor, appliance ratings, logbook
Generators are heavy, noisy, expensive to install and need servicing like any other diesel. Sizing one properly starts with finding out whether you need it.
The two numbers
Peak AC load decides whether you need a generator at all. Air conditioning, an electric galley, a watermaker or workshop tools can exceed what an inverter and battery bank will sensibly deliver. Include motor starting surges, which are far higher than running figures and are the usual reason an undersized genset stalls.
Daily energy consumption decides how long it would run, and therefore how it should be sized and what it will cost to own.
Why oversizing hurts
A generator running lightly loaded for hours runs cool, which encourages incomplete combustion, carbon build-up and wet stacking — the same mechanism that damages a main engine idled for hours. Size to the real load, not to a comfortable margin on top of a worst case that never happens.
Check the alternative honestly
Many cruising boats avoid a genset entirely with a larger alternator and proper regulator, solar, and a battery bank sized to actual consumption. That combination is quieter, needs less maintenance and has no exhaust to corrode. See do I need a marine generator.
Installation is not an afterthought
Cooling, wet exhaust with anti-siphon protection, ventilation, fuel supply, sound control and compliant AC wiring are all part of the job — and the 230 V AC side is licensed work. See generator installation.