Real Madrid defender Ramos was named in Vicente del Bosque's 23-man party for Spain's Group C matches at Slovakia and Luxembourg this week.
However, he will leave Spain's training camp after tests on the injury revealed he would not be fit enough to play.
Barcelona's Bartra has subsequently been drafted in to deputise.
"Sergio Ramos is ruled out for the matches against Slovakia and Luxembourg," read a statement on the Spain national team's official website.
"Centre-back Ramos will leave the training camp due to a calf injury in his right leg.
"The player has undergone medical tests in the Sanitas La Clinica Moral. Marc Bartra will join up the squad today."
Spain opened their European Championship qualifying campaign with a 5-1 demolition of Macedonia last month.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.