The formula
displacement = π ÷ 4 × bore² × stroke × cylinders. With bore and stroke in millimeters, divide by 1,000 to get cc. One cubic inch is 16.387 cc.
Overbore vs stroker
An overbore machines the cylinders wider and uses bigger pistons. It's usually limited to about 0.5–1 mm before the cylinder walls get too thin, so the gain is small. A stroker uses a crank with a longer throw. It adds more displacement and torque, but piston speed rises, which can lower the safe redline.
Bore-to-stroke ratio
An engine with a bigger bore than stroke (oversquare) has room for larger valves and lower piston speed, so it tends to like revs. An undersquare engine (stroke longer than bore) tends to make its torque lower in the rev range.