how to find the approximate [stellar radius]? (distance from center to most distant star) of a circular flat disk galaxy based on its stellar mass? I'm doing a high school programming project on drake's equation (simple galactic model) and wondered if there was a (simplified) way to find the radius (measured by the distance between the center and furthest star) of a galaxy based on its stellar mass. I found a few websites but I don't understand many of the terms and symbols in the equations shown. would love a simplified equation if possible.
In the project, I am modeling a 2d circular disk galaxy with no rotation.
I have a Y10 level understanding of maths.
What you are looking for is called the &quot;galactic size-mass relation&quot; for galaxies dominated by disks.
Theres an interesting research paper by Rebeca Lange and others where this relation (equation 3 in the paper) has the form
$R = \gamma M^{\alpha}(1+M/M_0)^{\beta-\alpha}$
Where $R$ is the radius of the galaxy in kiloparsecs ($1$ kpc $= 3260$ light year), $M$ is the mass of the galaxy measured in solar masses ($1$ solar mass $= 1.988\cdot 10^{30}\; kg$), and $\gamma$, $\alpha$, $\beta$ and $M_0$ are parameters that have been tweaked to adjust the relation to the real data.
In their paper they propose values for $\gamma$, $\alpha$, $\beta$ and $M_0$ for different kinds of measurements and galaxies. For the late-type galaxies (which are the ones that you want to study), these parameters are shown in table 2 with values that have a certain range.

$\alpha$ between $0.13$ and $0.17$
$\beta$ between $0.91$ and $1.00$
$\gamma$ between $0.08$ and $0.18$
$M_0$ between $19\cdot 10^{10}$ and $48\cdot 10^{10}$ solar masses

To make an approximate guess let's take the average values they present for each parameter. Then you will have the relation:
$R = 0.12\cdot M^{0.15}\cdot(1+3.8\cdot 10^{-12}M)^{0.81}$
Again with $R$ in $kpc$ and $M$ in solar masses.
With everything into account we are ready to plug-in some numbers. For example, the Milky Way galaxy is known to have a mass of $M = 10^{12}$ solar masses. This means that according to our model the Milky Way disk has a radius of $R = 26.97 \; kpc$. Well it turns out that we think the disk to extend between $170,000$ and $200,000$ light years in diameter, which translates to $26 \; kpc$ to $31\; kpc$, so we proved that the model works at least for our galaxy, even if our prediction is in the lower bound of the range.

Now, the devil is in the details; $R$ is not actually the radius of the disk as you might think. The radius is an ambiguous term here since disk galaxies don't have a sharp edge where stars stop to exist. The $R$ in the formula is actually the so-called &quot;effective radius&quot;, wich is in fact just the radius which contains half of the light emmited from the galaxy (this is an unambiguous way to measure the size of the galaxy). So, when talking about the radius $R$ I would take this into consideration, and use maybe a $1.2R$ estimate (20% larger) as my &quot;true&quot; radius for the galaxy.
Another important thing to consider is that the mass of the milky way has been measured including the mass of the dark matter and the mass of the gass. If you only want stellar mass, then the calculation will yield a galaxy that might be smaller.
These two are unimportant points if you are making just a highschool project and they don'tchange drastically your models either way, but I have to warn you about a consideration here. A galaxy that has a mass of $x$ solar masses is not a galaxy that has $x$ stars (planetary systems). That would certainly happen if all the stars where like the Sun, but as it turns out the vast majority of stars are less massive than the Sun, thus an $x$ solar mass galaxy will have much more than $x$ stars. If you are going to play with the Drake equiation that might be important. Finally if you search for the Milky Way data you will see that we think it has a mass of $M = 10^{12}$ solar masses, as I said, and we think it has around $2\cdot 10^{11}$ stars, so what's happening here? Shouldn't a galaxy with mass $x$ solar masses have more than $x$ stars? The problem here is, as I said previously, that we are considering the mass of the entire galaxy including gas, dust and dark matter, but we are only concerned about stellar mass.

I'm very interested in your project. Would you mind to tell me more about it? I'm just curious.