Data entry

Polynomial Regression Online Interface

This interface is designed to allow the graphing and retrieving of the coefficients for polynomial regression. This includes the mean average and linear regression which are both types of polynomial regression. Higher-order polynomials are possible (such as quadratic regression, cubic regression, ext.) making this tool useful for a range of analysis.

The data to analyze is placed in the text area above. It must be formatted so the first column is the x-values, and the second column the y-values. Columns may be separated by any character such as a comma. This character used for separation has to be specified. The same is true for the row separators. Generally a comma, space, or tab is used to separate columns and a linefeed to separate rows. Copying data from common spreadsheet software uses a tab to separate columns, and a linefeed to separate rows.

The regression analysis has several results that can be displayed. The equation displays the function that will produce the regression line. The coefficient check box will enable the individual coefficients to be printed from lowest order to highest. This is useful for copying the coefficients. A graph of the data and the regression line can also be made. This allows visual inspection of the data and the fit of the regression function. Lastly the R2 value can be displayed. This is a value that ranges between 0 (the worst fit) to 1 (a perfect fit) and used to determine the goodness of fit. The time needed to run the regression analysis is always displayed and reflects how long the server spent calculating the data.

Examples are provided to demonstrate various regression plots, and how the data is entered. To show the example, check the "Show examples" check box, and then select an example to display. After an example has been selected, the data for the example will be loaded into the form. Submitting this data will run the regression analysis and display the results. Each example displays the starting function so the fit can be compared.

Because this is a server-side script, the amount of data that can be entered is limited to 10000 points. The maximum number of coefficients to use in the regression analysis is limited to 15. Lastly, the precision of the data is limited to 20 decimal places. Should you require more data or coefficients, feel free to download the PHP library and run this program on your own computer.

User comments

From Andrew Que (

Middleton, WI, USA

May 05, 2014 at 6:47 PM

Leave some feedback if you found this interface useful.

From Kat

Fayetteville, AR

December 08, 2014 at 10:35 AM

This was very helpful since I forgot my calculator! Thank you so much! Would it be possible to add logarithmic or exponential regression to the list of available choices, please?

From Ken A

Southeast PA

December 12, 2014 at 1:41 PM

A most excellent tool.  Thank you!

From Pat

Melbourne, FL

December 16, 2014 at 9:34 AM

Really great, thanks so much.

From Sebastian

Wallingford, CT

January 08, 2015 at 8:00 PM

Thanks so much, I don't have a graphing calculator with polynomial regression, so helpful.

From Adam Douglass

Sierra Vista, AZ

January 09, 2015 at 11:25 AM

Thank you, this website helped my group with my engineering project. We got a strange graph by measuring the C02 output of a proof of concept for a mosquito trap mechanism, and we used heptic regression on split up portions of the graph, and obtained a rough estimate of the function of our graph. Thank you.

From Eduardo Contreras (

your butt,CA

March 05, 2015 at 4:48 PM

this website is stupid and u have no life

From Roger

Portland OR

March 12, 2015 at 12:08 PM

I needed to find a best fit curve using more coefficients than my spreadsheet software provided.  This website was perfect!

From Jose Luis Navarro


April 17, 2015 at 4:11 AM

Excellent job

From f you

April 25, 2015 at 5:28 PM

stupidest f-ing website ever

doesn't make any f-ing sense and doesn't f-ing work

From raj

April 30, 2015 at 5:12 AM

very helpful indeed

From Jesus Mejia Mendoza

Queretaro, Mexico

May 21, 2015 at 11:09 AM

This application help to me to fit easy, confident and fast the test data into the functions to make more confortable my work, thanks.

From Anil (

bangalore India

May 27, 2015 at 6:19 AM

Very helpful indeed. Thank you so much...

From Patrick

June 04, 2015 at 2:34 PM

Just awesome, we use this almost on a daily basis.

From Zoltan Vajda (http://r safety reason) )

Budapest, Hungary

June 18, 2015 at 12:49 PM

Thank you for your valuable work. I have checked theresults with Minitab vers. 14.0 and it is OK! Because Minitab works with Microsoft Windows only, and I use (for safety reason ) Ubuntu Linux , your page is a great help !

From rossisen (

North Bay, Canada

June 19, 2015 at 5:48 AM

This was very helpful for checking the results of regression calculations I am doing in the Geometer's Sketchpad.

From gyanguide (


October 05, 2015 at 4:46 AM

Thank you, this website helped my group with my engineering project.

From infocampus (


October 06, 2015 at 6:36 AM

it is very helpful .thankyou for posting

From Mike S.

Pacific Grove, CA

October 15, 2015 at 2:20 PM

Thank you!  I needed a high-precision polynomial regression fit and your site gave me EXACTLY what I needed.  Simple and highly functional - perfect.  Thanks again.

From Day (http://Brazil)

October 28, 2015 at 11:40 AM

Very good!Help me a lot.Thank you

From Mark Ptak (

Madison, wi

November 30, 2015 at 9:05 PM

Very nice.  Any hints on how to force a curve that always has a negative or zero slope?

From Nani


December 02, 2015 at 8:59 AM


From mike


December 27, 2015 at 8:29 PM

you need a data input example

From Bob

Melbourne, Australia

February 10, 2016 at 12:33 AM

Could you submit your PHP libraries to GitHub, Composer/Packagist?

From Peter Rasmussen

Cornwall, UK

February 20, 2016 at 8:20 AM

I stumbled across this site by accident and found it so helpful in my project

From I don't understand


February 20, 2016 at 11:34 AM

I don't get how this works. It makes no sense. I can't enter my data properly.

From Paul wilm (http://DIS T156.Ord)

Chicago Illinois

April 29, 2016 at 8:22 PM

If users just looked at the the examples provided it's easy to see how to enter data in the correct format. Great format for modeling reliability and validity of assessment item analysis data.

From Kyle


May 19, 2016 at 2:09 PM

This website was extremely helpful! It was great to be able to take output from a java program in a txt and then just copy and paste!  Very very helpful:)

From Eric


May 21, 2016 at 2:45 AM

Very helpful. I am using Air Force DATCOM program to calculate some control coefficients for an aircraft design. I have to use experimental CFD wind tunnel data to get the longitudinal coefficients. Well, DATCOM has arrays for the data inputs, and one array wanted slopes of a function (like pitching moment due to alpha). That line is NOT linear, so I entered in the data as two columns, alpha vs. pitching moment and got the nice equation. Then, I took first derivative of the equation and used that in spreadsheet cells to generate the line slopes at any given alpha. Saved me ton of time and grief. Thank you. 

From miz

May 21, 2016 at 10:12 AM

this saved my life, multiple times. it works so well!

From Maz

Aberdeen, Scotland

May 31, 2016 at 1:16 PM

Thank you taking the time for developing the tool and sharing it with us. Very helpful.

From JD

Tulsa, OK

July 19, 2016 at 2:04 PM

Saved for later.  Can't use it this time because my dataset is too big.

Thanks for the development.

From Naef

August 14, 2016 at 10:43 AM

very useful, thanks.

From pgmaser

Houston, Texas

August 16, 2016 at 7:28 PM

Any chance you could show equations model or approximations.  How are finding the Coefficient of Determine for higher order Polynomial.  Website is Great, its works and its graph and solving

some of my problems. Anyway, I need some help in solving cubic equations in a labview environment. if anyone wants to suggest somethings.

From MHSLRD (http://Reddind, California)

Aug 17, 2016

August 17, 2016 at 5:35 PM

EXCELLENT!  Thank you.

From Steve

Niceville, FL

September 21, 2016 at 9:02 AM

Tried Excel and Matlab - both failed miserably to come up with a curve fit.  Your tool worked perfectly!  Thanks!

From JT

United Kingdom

September 27, 2016 at 4:51 AM

Absolutely amazing resource.  There are many tools for curve fitting, but most have very limited data sets.  This gives you much more data set freedom, but the real power of this tool is being able to force coefficients.  I couldn't find any other tool online that could do that, including paid sites.  Well done and thanks for providing this!

From Tom

The Netherlands

October 08, 2016 at 5:48 AM

Very handy, easy to use. Thanks a lot!

From Emanuel


November 16, 2016 at 3:43 AM

Very good site, but you have a bug on logaritmich regression. The resulthing coefficients are missmatched. It should be f(x) = B*ln(x) + A.

From School boy Q

Sioux falls South Dakota

November 22, 2016 at 9:59 AM

Ill beat that ass lil nigga ah hell nah

From Peko (http://caiaconio)

caia conio

November 30, 2016 at 1:16 AM

ty bro yo are the best person in the world. Thank's C: Hdp viva willyrex

From Pic18cachondo


November 30, 2016 at 4:48 AM

Hola estoy muy solo busco compañia!

From IC (

November 30, 2016 at 4:49 AM

Puta mierda asignatura

From From

November 30, 2016 at 4:54 AM

Cogia todos los pics y los reventaba.



November 30, 2016 at 5:06 AM

Compro riñon urge, buen comprador 5 estrellas no me fio, quedamos en barcelona para transplante.

Vendedores serios Gracias

From Thomas (

Tirana, Albania

December 02, 2016 at 5:23 AM

This is great for use in our robotics class.  Our robotic arm has several non-linear relationships towards the ends of its extremes. It would be fairly hard to come up with an efficient and accurate function  You helped me produce the formulas for spatial coordination.   

From The Big G

Con Tu Mama

December 08, 2016 at 4:01 PM

Listen To My Mixtape

From Generic cancer cell

December 08, 2016 at 4:02 PM

I sexually identify as the FitnessGram Pacer Test. Ever since I was a kid I dreamed of being an multi stage aerobic capacity test that progressively get more difficult as it continues. People tell me that a person can´t be a school fitness test but I don´t care, I´m beautiful. Every morning I wake up and tell myself "The 20 meter pacer test will begin in 30 seconds". My running speed starts slowly but gets faster every minute. In school, every time I hear the bell I think "A single lap should've been completed, and if It isn't completed twice the test is over". From now on I want you guys to call me Fitness Gram and respect my right to run in a straight line and run as long as possible. If you can't accept that I am a aerobic capacity test then you're a testophobe and you need to check your running privelage. Thank you for being so understanding

From Big_tit_bitch69 (

La verga

December 08, 2016 at 4:04 PM

Alguien tiene tacos?

From Hot Singles (

December 08, 2016 at 4:06 PM

Hot Singles In Your Area ;) Sign up now, no BS

From Kill me plz. ───█───▄▀█▀▀█▀▄▄───▐█──────▄▀█▀▀█▀▄▄ ──█───▀─▐▌──▐▌─▀▀──▐█─────▀─▐▌──▐▌─█▀ ─▐▌──── (http://. ───█───▄▀█▀▀█▀▄▄───▐█──────▄▀█▀▀█▀▄▄ ──█───▀─▐▌──▐▌─▀▀──▐█─────▀─▐▌──▐▌─█▀ ─▐▌─────)

. ───█───▄▀█▀▀█▀▄▄───▐█──────▄▀█▀▀█▀▄▄ ──█───▀─▐▌──▐▌─▀▀──▐█─────▀─▐▌──▐▌─█▀ ─▐▌──────▀

December 08, 2016 at 4:12 PM












From Kill me plz

December 08, 2016 at 4:14 PM

. Bush did 911











From Raffaele

Pistoia (Italy)

December 14, 2016 at 3:06 AM

Strumento utilissimo. Grazie infinite...

From Sam

Cardiff, Wales

January 15, 2017 at 4:08 PM

This is great! I created my own version of this a while back but when I got >8 degrees it became slow. But this website can handle 15 degrees with no problem. How??

From Francois

Paris, France

January 23, 2017 at 6:38 AM

Very nice, fast.

It would be great to have the maximum error.

From Mansur

Pittsburgh, PA

February 02, 2017 at 6:26 PM

Excellent tool, thank you so much!

From dhananjay (


February 13, 2017 at 5:21 AM

very good tool, thankful to you.

From Blaise

Minnesota, USA

February 16, 2017 at 6:27 AM

Thank you very much, this works great and I use it a lot.

From Alex


February 23, 2017 at 9:35 PM

Thank you this tool. Usually I use MS Excel to play with polynomials to see how measurements behave, but it is limited to 6 order polynomial only while sometimes I need to verify data against 9- or ever 11-order. A quite helpful tool!

From Rajnikanth


February 28, 2017 at 6:51 AM

This is great and very useful. I want to fit still higher order and  my datapoints is ~8000. where is the link to download php code. I will refer your work.

From Walter74

Chamonix, France

March 15, 2017 at 11:19 AM


While checking some 2nd degree polynomial R²s produced using your Code against Excel values, I came across some anomalies when a set of data contained a number of values smaller than 0.0001 . However, these anomalies disappeared when I set the bcMaths to bcscale(20).

One example: 0.7142 compared to an Excel value of 0.9629

This post is duplicated on the page

Hope this is helpful & thanks again.

Yours, Walter

From AD

UK, north west

May 08, 2017 at 7:10 AM

Simple to use and got me a great fit equation for an old road using measured coordinates.

From Suny


July 19, 2017 at 8:33 PM

Wow, simplest and yet most accurate calculator ever!!! Bomb bomb bomb



I want to thank everyone who has used this site and left feedback. This page is now the most active on my server. The popularity of the site has inspired me to add improvements. Comments about how the site is used is both gratifying as well as useful. Seeing applications where polynomial regression can be applied is useful to me as well as students who also use this site.

Feel free to make requests for features, interface options, ext. I can't promise I can implement them all, but getting a feeling for features/changes people want helps me consider where to concentrate improvement efforts.

Not everyone is always happy with this site—or having to use this site. Even primary school students from the Las Virgenes Unified School District in Los Angeles County, California are still free to voice their opinion. As long as the comments are not inundated with extraneous/malice remarks I support the right of students to voice their discontent. Disgruntled users may consider pointing out what they don't like about the site, why they don't like having to use the site, or why they don't enjoy the subject. Remember: what is written here cannot be censored by a school administrators.


One of the goals of this page was not only to provide a tool for calculating polynomial regression, but examples of how such techniques are used in real-world scenarios, and some of the mathematical phenomena exhibited.

Here are some articles on the mathematics of polynomial regression:

This site has been used by people from primary school through distinguished universities. My hope is to provide something that can be useful to each level of user. I do not expect that high school students will be able to follow partial differentiation and the linear algebra necessary for the equations behind the regression technique. However, a pre-calculus student might be able to visually understand the concept of minimizing a quadratic function. For university level students I hope the explanations are detailed enough to give a comprehensive picture of how and why the algorithms work.

These goals require feedback. Suggestions, additions, clarifications, corrections, and criticisms are all welcome. Language is not my strong point, and while I have tried to convey ideas in the most clear manner I don't always succeed. And while I am better at math I am far from above mistakes. So proof reading and peer review would be nice.



The data submitted is analyzed server-side, and saved for the duration of the session (which is 24 minutes). Aside from the mathematics performed on the data, no other analysis is done. The data is not kept, and will never be shared—even with the site's author. We are not a data mining company. Nonetheless, this site does not use a secure connection (i.e. no encryption or authentication), and thus it isn't recommended this site be used to analyze highly sensitive sets of data.

We do, however, keep records for basic Web analytics. These are used for statistical purposes such as the number of visitors a day and tracking spam robots.


This page is designed and maintained by Andrew Que. To get in touch with Andrew Que, visit his contact page. It uses the Polynomial Regression class to preform the regression calculations and X/Y Plot to graph the results.