Bore diameter x bore diameter x .7854 x stroke length x number of cylinders = displacement
So current GM 3.8L, for example.
3.80 bore, 3.40 stroke.
3.8 x 3.8 x .7854 x 3.4 x 6 = 231.3599904
That's cubic inches. Now, multiply that by 16.387064 because that's how many cubic centimeters in one inch and you get
231.3599904 x 16.387064 = 3791.3109697241856 which is rounded up to 3800. Since the volume conversion for 1 Liter is 1000 cubic centimeters, you get a 3.8L.