So there are a couple of interlocking concepts:
Lets take a look at this group I have marching along.

So that is 25 units all together. My screenshot cut off the army strength of 125.
Now if we select the artillery thumbnail it brings up the details of that part of the stack.

So the condition of these is quite good at 99%, but note that the SBDE is only 92%. The state based damage efficiency is a number that combines the condition of the units with the total number in the stack to display how effective they will be in combat.
So if we are attacking an armor class enemy:
10 artillery when attacking will each do 3.0 damage, so you expect 30 hit points of damage.
BUT the State based damage efficiency is only 92%. So 30hp *.92 = 27.6
Then there is the x-factor, which is a random number. For this example I will use 50%
27.6 hp damage possible * 50% x-factor = 13.8 damage to armor class.
I could have split my artillery into smaller groups to avoid having my attack value cut down to 92% because of too many units in the group.
So lets define an enemy:

So this group of 5 medium tanks has 123.4 hit points.
Our initial attack with the artillery did 13.8 damage to the Armored portion of the enemy stack. So roughly you take 123.4-13.8 = 109.6 hit points remaining. That works out to 88% health on the 5 medium tanks.
Since our attack was with artillery at range, I will figure on a second hit by the artilery before the tanks reach my position. So another -13.8 hit points on the stack leaving 95.8 hit points. This was the attack portion of the strength against armor class.
Now a few minutes after the second volley with my artillery these tanks reach my position. There are still 5 of them, at 77% health. My guess is their SBDE is 90%. My stack in this example happens to be all infantry class, so:
5 tanks * 7.0 attacking hit points against infantry class is 35 hit points damage to my stack.
If we pick a number for the X-factor let's use 72% this time.
35*.72 = 25 hit points damage to my units, which will get spread out among all the infantry class units in my stack.
I have 25 units, so roughly I would expect 1 hit point damage to every single unit in my stack. It isn't quite that simple as some types of units seem to take damage faster than others, so there are some other factors and formulas at work that I don't know about.
In response to being attacked, my units are going to defend themselves at the same moment. This will use the defending line of the strength against armor class.
So 10 artillery defend against armor with 1.5 = 15 hit points of damage * 92% sbde = 13.8
6 antitank defend against armor with 8 = 48 hp damage
7 antiair defend with 2 = 14
2 infantry defend with 1.5 = 3
So a total possible DEFENSE of 78.3 hit points against armor class. Again using the 50% x factor = 39.15 hit points damage. This is the damage that is returned to the attacker. This leaves the enemy tank stack at 56.65 hit points, or 45%
That completes one combat cycle. Each group in the battle can attack once per hour. Every time they are attacked they will defend. If your unit is stationary and is attacked it will defend every hour when the enemy attacks, but if you want it to attack you need to tell it to do so. Many times it is more advantageous to simply let your units defend, but not always.
So it depends on how you want to look at it, but in the example above: Each of the units in my stack received 1 hit point of damage each because I had so many to spread the damage out to. So I estimate 85% health remaining on my stack after the initial contact, and 45% health remain on the enemy stack. My prediction is for the battle to end with my units having 70% health and the enemy to be eliminated. Of course if I was directing the battle I would have split my group up and fallen back in order to get another hit with the artillery before contact, and kept the artillery shielded behind the rest of the force.
This was the longhand way of estimating a battle. For more complicated battles I like to use the battle calculator developed by @DxC
http://dxcalc.com/cow