There are plenty of methods to estimate task complexity.
I will list the most popular of them for you to be able to respond to a question:

  1. Bottom-Up Estimating - break larger tasks down into detailed tasks, and then estimate the time needed to complete each one.
  2. Top-Down Estimating - develop an overview of the expected timeline first, using past projects or previous experience as a guide.
  3. Comparative Estimating - look at the time it took to do similar tasks on other projects.
  4. Parametric Estimating - estimate the time required for one deliverable and then multiply it by the number of deliverables required.
  5. Three-Point Estimating - can do three estimates – one for the best case, another for the worst case, and a final one for the most likely case.

I found this link usefull:
https://en.wikipedia.org/wiki/Software_development_effort_estimation
According to the link above there are such methods like:

  1. Analogy-based estimation - Formal estimation model - ANGEL, Weighted Micro Function Points
  2. WBS-based (bottom up) estimation - Expert estimation - Project management software, company specific activity templates
  3. Parametric models - Formal estimation model - COCOMO, SLIM, SEER-SEM, TruePlanning for Software
  4. Size-based estimation models - Formal estimation model - Function Point Analysis, Use Case Analysis, Use Case Points, SSU (Software Size Unit), Story points-based estimation in Agile software development, Object Points
  5. Group estimation - Expert estimation - Planning poker, Wideband Delphi
  6. Mechanical combination - Combination-based estimation - Average of an analogy-based and a Work breakdown structure-based effort estimate
  7. Judgmental combination - Combination-based estimation - Expert judgment based on estimates from a parametric model and group estimation

To estimate time effectively, follow this four-step process:

  • Understand what's required.
  • Prioritize activities and tasks.
  • Decide who you need to involve.
  • Do your estimates.