Carbs or calories?

Which one turns into fat? I’m already buying food with less calories and less sugar. I just want to lose some fat and tone my muscles