The composite nature of a shallow bound state is studied by using the weak-binding relation, which connects the compositeness of the bound state with observables. We first show that the previous weak-binding relation cannot be applied to the system with a large effective range. To overcome this difficulty, we introduce the finite range correction by redefining the typical length scale in the weak-binding relation. A method to estimate the uncertainty of the compositeness is proposed. It is numerically demonstrated that the range correction enlarges the applicable region of the weak-binding relation. Finally, we apply the improved weak-binding relation to the actual hadrons, nuclei, and atomic systems (deuteron, X(3872), D * s0 (2317), Ds1(2460), N Ω dibaryon, ΩΩ dibaryon, 3 Λ H, and 4 He dimer) to discuss their internal structure from the compositeness. We present a reasonable estimation of the compositeness of the deuteron by properly taking into account the uncertainty. The results of X(3872) and the N Ω dibaryon show that the range correction is important to estimate the compositeness of physical states.