1Same; identical; equal — describing two or more things that are not distinguishable in nature, form, or content.
私たちは同じ学校に通っている。
We go to the same school.
サイズは同じだが、色が違う。
The size is the same, but the color is different.
同じミスを二度も繰り返してしまった。
I ended up making the same mistake twice.
彼とは同じ年齢で、趣味も似ている。
He's the same age as me, and our hobbies are similar too.
2Anyway; either way it makes no difference — used adverbially to say that a choice or outcome doesn't really matter, often in the pattern 同じ~なら ("if it's the same either way").
遅れても早く着いても同じだから、気にしなくていいよ。
It's the same whether you arrive late or early, so don't worry about it.
勝っても負けても同じ気分だ。
I feel the same whether I win or lose.
同じ値段なら、質のいいほうを買いたい。
If the price is the same either way, I'd rather buy the better-quality one.