Unfortunately, I don't believe what you're looking for exists.
Stars are invisible during the day to the average human eye due to Rayleigh scattering in the atmosphere. (We're going to ignore how this changes if, e.g., you use a telescope or electronics to sense something other than visible light.) Rayleigh scattering is what's responsible for that lovely blue glow we see at noon on a cloudless day. It's also what obscures the stars. All atmospheres scatter light. If you stood on a world without an atmosphere and looked up during the day, you'd see the stars quite easily.
It's worth noting that Rayleigh scattering is based on...
- the chemical composition of the atmosphere,
- the density of the atmosphere,
- the thickness of the atmosphere,
- and the "time of day" (angle of incidence of sunlight as it hits the atmosphere), which is a function of knowing where on a planet the observer is standing in relation to the rotation of the planet compared to the sun.
It's worth noting that light reflected from the Moon contributes little, if any, to the obscuring effect of Rayleigh scattering. I don't have the science to back this up. But I've seen cloudless days with the moon in the sky and cloudless days without it and the imperceptible star field remains imperceptible either way.
But, could you use the brightness of a moon to index the visibility of stars?
I'll give you the bad news later on. But we need to talk about moons. The reflected light of a moon is a function of its albedo. "Albedo" is a measurement of the reflectivity of an object. A moon's albedo is a function of...
- the chemistry of the surface materials,
- the size of the moon,
- the distance of the moon from the planet.
Said simply, if you don't know the albedo of a moon, then you don't know how much light is being reflected, which means the perceived brightness of the moon can't be used to calculate star visibility.
BTW, as a reference to how complex this can get. Our Moon has an albedo of 0.07 while Venus has an albedo of 0.60. Nevertheless, at high noon we can see the closer and perceptually larger moon than the more distant and perceptually smaller Venus. Albedo is a measure of reflectivity, not brightness. An object can have a very high albedo and still have a low magnitude brightness.
Thanks to Rayleigh scattering, magnitude is a perception
Let's mention the numbers you're using. 6-7, -10, -9, and -18. I believe you're talking about stellar or astronomical magnitude. That magnitude, when perceived in open space, has a predictable absolute value. But when an atmosphere gets involved, the perceived magnitude is lower and fairly messy to calculate.
Think of it this way: thanks to Rayleigh scattering, you need a certain number of photons ("perceived magnitude") to get through the obscuring effect. Our Moon's albedo is low, but thanks to it being fairly close to us and taking up a sizeable chunk of our sky, it can be seen (has a lot of photons or a high "perceived magnitude") during the day. Venus, being so distant and taking up so little of our sky, simply isn't dumping enough photons (low "perceived magnitude") on us to be seen through the scattering.
The problem with trying to find a relationship between the perceived magnitude of an arbitrary star (e.g., +$\infty$ during the daylight hours on Earth) is that you need to know (simplistically)...
- The color of the star.
- The unaffected-by-atmosphere brightness (magnitude) of the star.
- The effect of Rayleigh scattering on the star's brightness.
- Meaning you need to know the chemical composition of the atmosphere
- and its density
- and it's thickness
- and the "time of day" or angle of incidence of sunlight
- The albedo of the moon.
- The effect of Rayleigh scattering on the moon's brightness (see sub-list, above).
- The unaffected-by-atmosphere brightness of a particular target star.
- The effect of Rayleigh scattering on the target star's brightness (see sub-list, above).
And that ignores questions like which star? What's its color, size, and distance from the target planet? Etc.
What can I say, but "yuck."
Is there a way to simplify this?
Well... no.
The problem is that I suspect you're looking for a "realistic" way to "easily" decide whether or not stars are visible during the day given any arbitrary combination of star, planet, moon, and observer. It feels like we should be able to come up with a simple relationship. If we're in open space, celestial object magnitudes are reasonably absolute. Rayleigh scattering scatters all light. It's like a camera filter. As the scattering effect increases, the ability for any particular magnitude to be visible from the surface decreases. In other words...
If you can index the obscuring ability of Rayleigh scattering and if you know the unobscured magnitudes of everything in question, you can come up with a formula that does what you're looking for. A dial you can turn to identify the visibility of stars from the surface.
But that formula would only be useful if you ignore the specifics. What's creating a moon's albedo? What's causing a particular amount of Rayleigh scattering? The moment you want to know those values, the formula becomes way too complex to deal with easily. In fact, it gets pretty complex the moment you try to apply it to Earth and ask the question, "why can I usually see Venus before any stars?"
Well... Venus' albedo, time of year (angle of reflection), time of day (angle of sunlight incidence on Earth), yada yada yada....
So... to answer your question...
You don't want this. It's a level of "realism" that's unproductive for worldbuilding. I've read a couple of papers about Rayleigh scattering and I don't believe a simple formula can be derived given (e.g.) the ratios of atmospheric chemistry, density, and thickness and you'd need at least that just to get to the "simple" formula.
Therefore, I don't believe the formula you're looking for (in a form easily used) exists. I must recommend that you simply declare the visibility to be what you want it to be in each case you need it.