Magnitude was a number that defined the brightness of an astronomical object.
For an object such as a star, the amount of brightness emitted was reflected in the intensity of radiation produced. A star with a superdense corona had a higher level of magnitude, which translated into the radiation being more intense.(TOS: "Balance of Terror"; TNG: "Suspicions")
In 2266, Comet Icarus IV was rated as a magnitude seven comet by the sensors of the USS Enterprise. (TOS: "Balance of Terror")
In 2267, Gothos was rated as a a magnitude 1E planet by the sensors of the Enterprise. (TOS: "The Squire of Gothos")
Later that year, the primary of the Gamma 7A system was rated as a fourth magnitude sun. Information on this system was stored in the library computer of the Enterprise. (TOS: "The Immunity Syndrome")