California still ranks as the world’s No. 4 economy, but only by a narrow margin. The latest comparison places the state just ahead in a tightly packed group that also includes Japan, Great Britain and India.

The gap is about $250 billion in business output, which works out to roughly 6%. That small spread highlights how close the competition has become among the economies clustered around the fourth-place position.

The ranking is based on gross domestic product, a broad measure of economic activity. Using GDP as the benchmark shows California continuing to operate on a scale comparable with major nations, even as the distance between contenders remains slim.

The takeaway is that California’s place near the top of the global economy is intact for now, but not by much. With such a modest lead, shifts in growth could quickly reshape the order around the No. 4 spot.