# Galactic mass proportional to r

How do I calculate galactic mass as a function of r? I know it is supposed to be proportional to r. I've seen,
M(r)=v2r/G
And also I've seen
M(r)=vrc2/G
Which if any is right?
And what do I use for v?
Thanks so much for your help!