Defragmenting indexes SQL Server bases on avg_page_space_used_in_percent
I have these rules of thumb:


if there are fewer than 10,000 pages in a table, I don't really care about fragmentation;
if the storage layer is solid-state, I don't really care about fragmentation;
once or twice a month I might rebuild indexes on really fragmented tables, but only if fragmentation is demonstrably causing performance issues, which it usually isn't.


Fill factor can affect fragmentation, as can page splits, bad clustered index choices, and so on. Find the actual performance issues using a baseline, and focus on those.