Eating at Subway can be just as bad for you as eating at McDonald's, according to a study by scientists at the University of California, Los Angeles.

The study tracked the eating habits of 87 adolescents, ages 12 to 21, who purchased food at McDonald's and Subway. Researchers collected the receipts and calculated nutritional value based on information posted on the restaurants' websites.

On average, McDonald's meals contained 1,038 calories, whereas Subway meals contained 955 calories. The average Subway sandwich contained 784 calories, compared to 582 calories for the average McDonald's sandwich.

For people trying to eat healthy, the difference was not significant enough to be important, scientists said.

"We found that there was no statistically significant difference between the two restaurants, and that participants ate too many calories at both," public health scholar Dr. Lenard Lesser, who led the study, said in a statement.

At McDonald's, study participants consumed more carbohydrates, 128 g compared to 102 g consumed at Subway. McDonald's also led in sugar, with an average of 54 g consumed versus 36 g of sugar at Subway.

But Subway led the charge in sodium, 2,149mg versus 1,829mg sodium consumed at McDonald's.

The Centers for Disease Control and Prevention has warned that a diet high in sodium can lead to hypertension, heart disease, and obesity. Nonetheless, sodium levels in fast food continue to rise.

Indidivual sandwiches at Subway were often found to have a higher calorie count than McDondald's sandwiches. For example, Subway's foot-long Big Philly Cheesesteak is 1,000 calories and 2,560 g sodium, roughly double the McDonald's Big Mac, which has 550 calories and 970 g sodium.

The Institute of Medicine recommends 2,400 calories per day for adolescents, researchers noted.

If you are buying a meal at McDonald's or Subway, you can make it healthier by forgoing sugary drinks, chips, and french fries, said Dr. Lesser. He also recommended that people eating at Subway choose smaller sandwiches with plenty of vegetables.

The study was published online Tuesday in The Journal of Adolescent Health.

Subway Global Dietitian Lanette Kovachi responded to the study, the New York Daily News reports.

"We want to clarify a few things," Kovachi said. "As long time leaders in offering customers healthier options, Subway restaurants has always provided customers nutritional information on all of our menu offerings along with a wide array of great-tasting, low-fat and low-calorie subs and salads. We stand behind our nutritional offerings and continue to make advancements to our menu that meet the evolving tastes of our customers."

Lenard I. Lesser, M.D., M.S.H.S., Karen Kayekjian, Paz Velasquez, Chi-Hong Tseng, Ph.D., Robert H. Brook, M.D., Sc.D., Deborah A. Cohen, M.D., M.P.H.Adolescent Purchasing Behavior at McDonald's and Subway. Journal of Adolescent Health. Published online 07 May 2013. Accessed 13 May 2013.