Around the turn of the 19th century the Kaiser formed a commission under the leadership of Leo Plato whose charter was to measure the specific gravities of aqueous solutions of sucrose of various strengths to 6 (yes, 6) significant places. The strengths of the solution were specified by weight, for example a 10% solution was such that a killogram of the solution contained 100 grams of sucrose (10 grams per 100 grams). That solution had a specific gravity of about 1.040 so if you went to the tables that resulted from the Kommission's work you would find against solution strength 10% the specific gravity 1.04003. In honor of the leader the tables now show 10% as 10 °Plato. That's the background. For any value of Plato there is a specific gravity and for any specific gravity there is a Plato number and these come from tables published by the ASBC and EBC or from formulas which approximate what's in the tables.
When you measure the specific gravity of a fermented beer and convert to Plato you get the Apparent Extract - apparent as that's what comes out of the table when you put the beer's specific gravity into it but, because the alcohol has lowered the specific gravity that number is in no sense representative of how much sugar is in a killogram of that beer. If you want a true measurement of that (the True Extract) you must first remove the alcohol and then measure the specific gravity again. The official procedure for doing this is to fill a volumetric flask with exactly 100 mL of the beer you wish to test, transfer that quantitatively to a boiling flask using two 25 mL aliquots of DI water to rinse the volumetric flask (i.e. get all the sugar from the beer into the distilling flask) and distill the mix until nearly 100 mL of liquid has been collected in the receiver. This is made up to 100 mL with DI water and used to determine the alcohol content of the beer but that's not what you are interested in here. You want the residue in the flask. This is transferred quantitatively back to the original volumetric flask, made up to 100 mL, the specific gravity of that measured and that value converted to Plato. That Plato value is the number of grams of extract in 100 grams of the rather disgusting mixture in the volumetric flask. But the flask contains more than 100 grams of mixture - it contains 100*SGm*0.998203 where SGm is the specific gravity of the mixture so weight of the extract in the flask is thus Plato_mix*(SGm*.998203). The extract came from 100*SGb*.998203 grams of beer where SGb is the specific gravity of the beer. The extract from 100 grams of beer is thus
TE = Plato_mix*(SGm/SGb).
Clearly you don't need a distillation apparatus to do this at home. You can boil or even evaporate the beer down to about 2/3 of it's original volume in any container and then quantitatively transfer back to the volumetric flask to make up to 100 mL.