The flare produced when a star is tidally disrupted by a supermassive black hole holds potential as a diagnostic of both the black hole mass and the star mass . We propose a new method to realize this potential based upon a physical model of optical/UV light production in which shocks near the apocenters of debris orbits dissipate orbital energy , which is then radiated from that region . Measurement of the optical/UV luminosity and color temperature at the peak of the flare leads directly to the two masses . The black hole mass depends mostly on the temperature observed at peak luminosity , while the mass of the disrupted star depends mostly on the peak luminosity . We introduce TDEmass , a method to infer the black hole and stellar masses given these two input quantities . Using TDEmass , we find , for 21 well-measured events , black hole masses between 5 \times 10 ^ { 5 } and 10 ^ { 7 } M _ { \odot } and disrupted stars with initial masses between 0.6 and 13 M _ { \odot } . An open-source python -based tool for TDEmass is available at https : //github.com/taehoryu/TDEmass.git .