How to calculate volumetric weight for air & sea shipment?

Air shipment (cm) Sea shipment (cm)
H x L x W = A
A / 6000 = B
B + real weight = C
C / 2 = D

D is the volumetric weight for air shipment

H x L x W = A
A / 6000 = B

B is the volumetric weight for sea shipment