G calculation