What is the distance to a galaxy if a Type 1a supernova with an apparent magnitude of + 18m is found in it?

What is the distance to a galaxy if a Type 1a supernova with an apparent magnitude of + 18m is found in it? On average, the absolute stellar magnitude of type 1a supernovae is -17.5m.

Absolute stellar magnitude М = m + 5 -5lg R
-17.5 = +18 + 5 – 51g R, log R = 8.1, R = 126,000,000 pc = 126 Mpc

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.