Both are top-tier all-in-one SEO suites at a similar price ($129 vs $139 a month to start). Choose Ahrefs if backlinks and keyword research are what you do most; choose Semrush if you also run Google Ads, need local SEO, or want one tool for everything including client reports.
Price
Ahrefs' full toolset starts with Lite at $129 a month ($107.50 paid yearly). Its $29 Starter plan is a cut-down research plan, not the full tool. Semrush's SEO plan is $139 a month ($117.33 paid yearly).
Semrush has a 7-day free trial and a free plan; Ahrefs has no trial, but a free account covers sites you own.
Where Ahrefs is stronger
Backlink data is Ahrefs' signature: a very large, frequently refreshed link index with clear link-gap and broken-link tools. Its keyword explorer and content explorer are equally strong, and the interface is a little cleaner.
Where Semrush is stronger
Semrush covers more ground: the best paid-search (PPC) data of any SEO suite, local SEO tools, content writing help and scheduled, client-ready reports. If you want one subscription to cover SEO and ads, Semrush is the safer pick.
The trade-off is more menus to learn, and its entry plan caps you at 5 projects and 500 tracked keywords.