I assume that you might want a ratio of the "sub" area and the larger area. For example a county might be the "large "area and the "subset" a single tract. You might want the ratio of the 2 populations (B01003)
In general the variance of a ratio is Mean(R/S) ~= (mean(R)/mean(S))^2 * [ var(R)/(mean(R)^2)-2*cov(R,S)/(mean(R)*mean(S))+var(S)/(mean(S)^2) ].
You can use variance replicate tables https://www.census.gov/programs-surveys/acs/data/variance-tables.html to compute the ratio and MoE. Look here for ACS 2021 5 year tables https://www2.census.gov/programs-surveys/acs/replicate_estimates/2021/data/5-year/ You need the geography level. For example a tract is level 140 see https://www.census.gov/programs-surveys/geography/technical-documentation/naming-convention/cartographic-boundary-file/carto-boundary-summary-level.html 050 is a county.
There are 80 replicates. [This is incorrect but this is roughly what you do. You can also compute the ratio R/S 80 times and take the variance of the 80 times and take the mean of the 80 values. This would be a bootstrap type calculation ]
The actual calculation is The variance of R/S is Var == 4/80 * [ sum( (Ri/Si)- R/S) ^2 ] The sum index i) is over the 80 replicates. Ri is the numerator for the i-th replicate Si is the denominator.
Margin of Error for R/S = 1.645 x square_root (Var)
In words:
1a. Calculate 80 Differences
1b. Square each difference
1c. Sum all of the squared differences
1d. Multiply the sum by 4/80
2. Take the square root to find the standard error (SE)
3. Multiply the SE by 1.645 to obtain the margin of error (MOE)
(look on line) . https://www.census.gov/content/dam/Census/programs-surveys/acs/news/Events/Calculating%20MOEs%20the%20ACS%20Way.pdf
Hope this helps.
Dave