The NAG Fortran Library


The largest collection of reliable and supported numerical algorithms commercially available

Produced by experts for use in a variety of applications, the NAG Fortran Library has a global reputation for its excellence and, with over 1,700 fully documented and tested routines, is the largest collection of mathematical and statistical algorithms available.

Now at its 24th major release, the NAG Library contains algorithms which are powerful, reliable, flexible and ready for use from a wide range of operating systems, languages, environments and packages including Excel, Java, MATLAB®, .NET/C# and many more.

Note: For multicore systems there are many benefits in using the NAG Library for SMP and Multicore that includes identical algorithms tuned to make best use of the characteristics of multicore processors.

Library Contents

The key numerical and statistical capabilities of the Fortran Library are shown below. To learn more about the latest routines at Mark 24 follow this link. A complete list of the contents of the Library is available here.

Numerical facilities

  • Optimization, both Local and Global
  • Linear, quadratic, integer and nonlinear programming and least squares problems
  • Ordinary and partial differential equations, and mesh generation
  • Solution of dense, banded and sparse linear equations and eigenvalue problems
  • Solution of linear and nonlinear least squares problems
  • Curve and surface fitting and interpolation
  • Special functions
  • Numerical integration and integral equations
  • Roots of nonlinear equations (including polynomials)
  • Option Pricing Formulae
  • Wavelet Transforms

Statistical facilities

  • Random number generation
  • Simple calculations on statistical data
  • Correlation and regression analysis
  • Multivariate methods
  • Analysis of variance and contingency table analysis
  • Time series analysis
  • Nonparametric statistics

Online Documentation

The software in the library is accompanied by acclaimed online documentation giving you the detailed information you need to carry out your work quickly and effectively.

Regular Updates

To ensure that we meet your existing and future requirements, the library is regularly updated with new and enhanced algorithms for use in evolving business areas. If you have suggestions for new routines please contact us.

Expert Support

Subscription to our dedicated Technical Support Service includes automatic notification of updates and access to our domain experts who are there to assist you with your technical queries or difficulties.

Quality Assurance

The validity of each component is tested on each of the machine ranges for which the product is available. Only when an implementation satisfies our stringent accuracy requirements is it released. As a result, you can rely on the proven accuracy and reliability of the components to give you the right answers.


The complete NAG Fortran Library Manual, Mark 24 can be viewed on-line in the following formats:

  • HTML: The full manual available as HTML (using HTML5 features such as MathML and SVG in suitable browsers);
  • PDF: the same manual as above, consisting of many PDF files, may be browsed using PDF bookmarks or via the HTML table of contents pages;
  • Single file PDF: the manual as a single PDF file;
  • ZIP file: The archive as a ZIP file (152 MB);
  • Windows html help: Windows html help version as a single file;
    (Note: due to windows security restrictions the help file may not be read directly from the internet. Save a copy to your local disk, and then read the local copy. Also depending on the Windows version installed you may need to unblock files copied from the internet before they may be used (right click on the help file and select properties then select the "unblock" button).

Advice on viewing and navigating the first three formats can be found in the Online Documentation help document. You are strongly advised to read this document if you wish to try the HTML format.

The two single file formats are more compact than the formats using one file per routine, but of course are a larger download if you only need to view the documentation for a few routines.

The Library is organized into Chapters - each being documented with its own Introduction and Contents list followed by a comprehensive document for each function detailing its purpose, description, list of parameters and possible error exits. Example programs and results are also supplied. All examples are available on-line to facilitate their use as templates for the users' calling programs.

The error bulletin contains a list of errors or other problems which are known to exist in the NAG Fortran Library, along with suggested workarounds where possible.

The previous marks of the NAG Fortran Library Manual are still available: Mark 23, Mark 22 and Mark 21.

A full list of routines withdrawn from past marks of the Library has been provided with pointers to the recommended replacement routine.

Support documentation for the installation and use of each implementation of the NAG Fortran Library is available.

Product Availability

The following table provides a simple mechanism by which you can determine the most appropriate NAG Fortran Library implementation for your needs. The table is organized by grouping implementations firstly by operating system and secondly by compiler; you simply select the combination appropriate to the system that you use. The most important information that you can derive from this is the NAG product code which is located in the rightmost column of each record and is a 10 character string beginning FL.


DLL (Windows API) 32 bit FLDLL244ML
Intel Fortran 32 bit FLW3224DCL
Intel Fortran 64 bit FLW6I24DCL
Intel Fortran 64 bit (ILP64) FLW6I24DDL

Linux (x86)

Intel Fortran 64 bit FLL6I24DCL
Intel Fortran 32 bit FLLUX24DCL
GNU Fortran 64 bit FLL6A24DFL
GNU Fortran 32 bit FLL3A22DFL
GNU Fortran 64 bit (ILP64) FLL6A23DHL
NAG Fortran 64 bit FLL6A24D9L
NAG Fortran 32 bit FLL3A23D9L
PGI f90 64 bit FLL6A24DPL

Linux (Power6)

IBM xlf 64 bit FLIL622DAL

Mac OS X

Intel Fortran 64 bit FLMI624DCL
NAG Fortran 64 bit FLMI624D9L


IBM xlf 64 bit FLAI623DAL
IBM xlf 32 bit FLAI321DAL
NAG Fortran 32 bit FLAI321D9L

Solaris (SPARC)

Sun f95 32 bit FLSOL22DCL
Sun f95 64 bit FLSO622DCL

Solaris (x86)

Sun f95 64 bit FLSA622DCL

Website Feedback

If you would like a response from NAG please provide your e-mail address below.

(If you're a human, don't change the following field)
Your first name.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.