If you look at Admiral Pike's rank insignia in Star Trek Into Darkness, and then look at Captain Kirk's insignia, they look pretty much the same. I am not able to really tell the difference. Both of them have 4 pins of some sort on their shoulder boards. The only possibility I can come up with is the spacing of them. Admiral Marcus has 5 so it's easy to see the difference with his, and Spock has 3.
The rank seems to be indicated not only by the pips on the shoulder board. It's a combination of that and their tunic.
The higher ranked Admirals (e.g. Pike and Marcus) have a white pillar on the front of the uniforms.
The lower ranked Captains/Commanders (e.g. Spock and Kirk) just have solid gray tunics.
So Admirals get 4-5 pips on the shoulder boards, plus white on the tunic. Captains and Commanders get 3-4 pips on the shoulder boards, with no white on the tunic.
Besides the white front of the uniform tunic, admirals have gold shoulder insignia, while captains and below wear silver.