bahn.de will literally spit out a cheap ass degressive tariff ticket for you if you put right stations(as close to your true starting point and destination)
to demonstrate: it's not from ลwidnica because for some reason DB is anal about it, despite selling tickets for KD trains to wrocลaw, so add 4-5โฌ to this