Starting from the construction of a solution for Einstein’s equations with a perfect fluid for a static spherically symmetric spacetime, we present a model for stars with a compactness rate of [Formula: see text]. The model is physically acceptable, that is to say, its geometry is non-singular and does not have an event horizon, pressure and speed of sound are bounded functions, positive and monotonically decreasing as function of the radial coordinate, also the speed of sound is lower than the speed of light. While it is shown that the adiabatic index [Formula: see text], which guarantees the stability of the solution. In a complementary manner, numerical data are presented considering the star PSR J0737-3039A with observational mass of [Formula: see text], for the value of compactness [Formula: see text], which implies the radius [Formula: see text] and the range of the density [Formula: see text] [Formula: see text], where [Formula: see text] and [Formula: see text] are the central density and the surface density, respectively. This range is consistent with the expected values; as such, the model presented allows to describe this type of stars.