A Ranged Touch Attack hit uses the formula:
Base Attack Bonus + Dex mod + Size mod + Range penalty
How do you figure out the range penalty?
Role-playing Games Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing games. It only takes a minute to sign up.Sign up to join this community
Typically, only weapons and other attack forms that possess a range increment cause their users to suffer with those weapons and attack forms penalties on their ranged attack rolls due to the distance to the target. On Weapon Qualities provides this description of a weapon's Range entry:
Any attack at more than this distance is penalized for range. Beyond this range, the attack takes a cumulative –2 penalty for each full range increment (or fraction thereof) of distance to the target. For example, a dagger (with a range of 10 feet) thrown at a target that is 25 feet away would incur a –4 penalty. A thrown weapon has a maximum range of five range increments. A projectile weapon can shoot to 10 range increments.
If an attack form has no range increment, typically the attack form just doesn't suffer penalties due to range. It can be used against a target at its maximum range as easily as it can be used against an adjacent target.
For example, most spells have a Range entry in their descriptions. If the spell requires a ranged attack or a ranged touch attack, the spell suffers all the vagaries of it being a ranged attack. Launching a scorching ray at a foe engaged in melee against an ally, for instance, causes the caster to suffer a −4 penalty on the scorching ray attack roll. Further, the scorching ray spell (like most spells) can't extend beyond its Range entry, but because the scorching ray spell doesn't have a range increment, the caster can pick any applicable target within the spell's range and make the ranged touch attack needed by the scorching ray spell without suffering any penalties due to range.