calculate attachment-free threshold