Sadiqur Rahman


Most people find out their EMI is too high after they’ve already signed. This is how you find out before.

I have a friend — smart guy, good job, knows what he’s doing — who took a home loan a few years back without properly calculating what the monthly payment would actually feel like against his take-home salary. He knew the number. He just didn’t really feel it until the first deduction hit his account and suddenly his entire lifestyle had to reorganize around this fixed monthly commitment he’d be living with for twenty years.

He’s fine now. He adjusted. But those first six months were genuinely stressful in a way he hadn’t prepared for.

This is, honestly, one of the most common financial mistakes people make. Not recklessness. Not ignorance. Just signing a loan agreement without spending ten minutes running the actual numbers first.

So let’s fix that.

What Even Is an EMI?

EMI stands for Equated Monthly Installment. It’s the fixed amount you pay every month to repay a loan — home loan, car loan, personal loan, education loan, it doesn’t matter. Same concept across all of them.

Every EMI payment you make has two parts inside it: some goes toward paying off the actual loan amount (called the principal), and some goes toward paying the interest the bank charges you for borrowing the money. The proportion shifts over time — early payments are mostly interest, later payments are mostly principal. But the total EMI amount stays the same every month throughout the loan tenure.

That fixed, predictable number is both the comfort and the trap of EMIs. It’s comfortable because you always know exactly what you owe each month. It’s a trap because it’s easy to look at a monthly number and think “that’s manageable” without calculating what it actually means as a percentage of your monthly income, or what happens if your income dips for a few months.

The Formula Banks Use

The EMI calculation isn’t complicated, but it’s not something you’d want to do by hand either:

EMI = P × r × (1 + r)^n / [(1 + r)^n - 1]

Where P is the principal loan amount, r is the monthly interest rate (annual rate divided by 12), and n is the number of monthly installments.

So for a loan of ₹10,00,000 at 10% annual interest for 5 years: r = 10/12/100 = 0.00833, n = 60. Plug those in and you get an EMI of approximately ₹21,247 per month.

Does that feel like a manageable number to you? Maybe. But what if your take-home is ₹45,000? That’s 47% of your monthly income going to one loan. Most financial advisors recommend keeping total EMIs under 40-50% of take-home pay — and that’s all your EMIs combined, not just one.

This is why you need to run the numbers before you sign, not after.

Use This Calculator First

The free EMI Calculator at sadiqbd.com/calculators/emi takes about thirty seconds and shows you exactly what you’re committing to. Enter the loan amount, the interest rate your bank is offering, and the tenure you’re considering — and you instantly see:

  • Your exact monthly EMI
  • Total amount you’ll pay over the entire loan period
  • Total interest paid — meaning how much extra you pay just for borrowing

That last number is the one that surprises people most. On a ₹20 lakh home loan at 9% for 20 years, the total interest paid comes out to roughly ₹20.8 lakh. You’re paying almost double the loan amount by the time it’s done. Not because anyone is cheating you — that’s just how long-term compound interest works. But knowing that number before you sign changes how you think about the decision.

No sign-up, no ads, runs in your browser. Just open it and try your numbers.

The Three Variables That Actually Matter

Every EMI is determined by three things. Understanding how each one affects your payment gives you real leverage when negotiating or planning.

The loan amount. This one’s obvious — borrow more, pay more. But what’s less obvious is that a small difference in the amount borrowed makes a surprisingly large difference in total interest paid over long tenures. Putting down a larger down payment on a home loan, even if it means delaying slightly, can save a significant amount in interest over 20 years. Worth running the numbers on.

The interest rate. This is where negotiation matters. Banks don’t always offer their best rate upfront — especially if you have a good credit score. A difference of even 0.5% on a large loan over a long tenure adds up to a substantial amount. For a ₹30 lakh loan over 15 years, the difference between 8.5% and 9% interest is roughly ₹80,000 in total interest paid. That’s real money.

The tenure. Longer tenure = lower monthly EMI, but much higher total interest paid. Shorter tenure = higher monthly EMI, but significantly less interest overall. This is the trade-off most people get wrong. They stretch the tenure to make the monthly payment comfortable, without realizing how much that costs them in total interest. Use the calculator to see the difference for yourself — compare the same loan at 10 years versus 15 years versus 20 years. The total interest numbers will make the decision clearer.

A Real Example Worth Looking At

Let’s say you’re considering a personal loan of ₹5,00,000 at 14% annual interest.

At 3-year tenure: EMI = ₹17,090/month. Total interest paid = ₹1,15,240. At 5-year tenure: EMI = ₹11,634/month. Total interest paid = ₹1,98,040.

The 5-year option saves you ₹5,456 per month. That’s a lot of breathing room. But it costs you an extra ₹82,800 in interest over the loan period.

Is that trade-off worth it? Depends entirely on your situation. If ₹17,090 per month is genuinely tight against your income, the lower EMI might be the right call even at higher total cost. If you can comfortably manage the higher EMI, the shorter tenure saves you real money.

This is exactly the kind of decision the EMI calculator at sadiqbd.com/calculators/emi helps you make clearly — you can toggle between tenures in real time and see the trade-off instantly instead of doing the maths in your head or trusting a bank executive to explain it to you objectively.

The 40% Rule — And Why It Matters

Here’s a simple rule of thumb that most people don’t think about until they’re already in trouble.

Keep all your EMIs combined — home loan, car loan, personal loan, credit card EMIs, everything — under 40% of your monthly take-home salary.

So if you take home ₹60,000 a month, your total monthly EMI commitments shouldn’t exceed ₹24,000. That’s not a hard law of physics, but it’s a reasonable buffer that leaves room for living expenses, savings, and emergencies without your budget becoming completely hostage to your loan repayments.

A lot of people blow past this number by taking on multiple loans across different life stages without tracking the cumulative EMI burden. A car loan here, a personal loan there, maybe some education loan still running in the background. Each one seemed manageable individually. Together they’ve consumed half the monthly income.

Before taking any new loan, add the new EMI to your existing commitments and check the percentage. If it pushes you significantly above 40%, either the loan amount, the tenure, or the timing needs to change.

What the Bank Doesn’t Tell You

Banks are not your financial advisors. They’re your lenders. Their job is to give you the loan you apply for, within the parameters you give them. They’re not going to volunteer that you’d save ₹80,000 by taking a shorter tenure, or that a 0.25% rate reduction is available if you ask for it.

A few things worth knowing that often don’t come up during the loan application process:

Processing fees add up. Most loans have a one-time processing fee of 0.5-2% of the loan amount. On a ₹20 lakh loan that’s ₹10,000-₹40,000 upfront. Factor this into your cost calculation.

Prepayment can save a lot. If you ever have extra money — a bonus, an inheritance, a windfall — making a partial prepayment on your loan reduces the principal and can significantly cut down total interest paid. Many people don’t realize this is an option or how much it saves. Some loan types have prepayment penalties — check before you sign.

Fixed vs floating rate matters for long tenures. A fixed interest rate stays the same throughout. A floating rate moves with market benchmarks. For short tenures, the difference is less significant. For 15-20 year loans, it can make a very large difference depending on where interest rates go.

The Bottom Line

Loans aren’t inherently bad. A home loan that lets you own a house instead of paying rent can be an excellent financial decision. A business loan that funds something with a clear return can make total sense. Even personal loans have legitimate uses in the right circumstances.

The problem is almost never the loan itself. It’s signing without understanding exactly what you’re committing to — what the monthly number is, what the total cost is, and whether the trade-off between tenure and interest makes sense for your specific situation.

Spend ten minutes with the calculator at sadiqbd.com/calculators/emi before you sign anything. Try different amounts, different rates, different tenures. See what the numbers look like.

It’s free. It takes a few minutes. And it might save you from the kind of unpleasant surprise my friend had in those first six months.

Recently I have sate for the ZCE (Zend Certified Engineer) exam on 28 January 2009, And I like to share my experience to all so that everyone can get prepared for ZCE Exam. However, Let me go to the topics.

The PHP 5 Certification exam covers the following topics:
PHP Basics
XML and Web Services
Functions
Arrays
Object Oriented Programming
Streams/Network Programming
Design Pattern
PHP 4/5 Differences
Security
Strings and Regular Expression
Databases Access
Web Features

Now let me say where you should study…

1) PHP Manual is the best reference to get prepared. This is not only the main reference but you must have deep eye on this tutorial if you are serious to be success. without following PHP Manual it is quite impossible to pass.
I suggest everyone to keep eyes on every functions mentioned into PHP Manual. Array Functions, String Functions and Database (MySQLi, PDO) and Exception handling are notable topics.

2) ZCE Study Guide You can get from zend.com but remember its not FREE.. you have spend a little money for this guide. You will learn from this guide Basic Language and basic of every topic. specially you will get knowledge from this guide on Security and Design Pattern etc…

3) Many PHP Forums You will learn manything from Forums and Newsgroup.

4) Mock Test Remember there is no similarity between mock and real exam but you will get some idea about your real exam.

5) Confidence if you do not have enough confidence you do not need to loss your valuable money 🙂

Checking the server response code is mainly a diagnostic  tool in case you are getting unexpected results when trying to view a page.  The  response code is sent by the server before the page contents along with other header information like response code, server software, cookies, content type, date etc..

For example, a user had a non existing page which was  showing his site fine but the server was returning a missing page code (404) so  none of the content of this page is actual content you are looking for.

How to send 404 response to the user?
it is very simple.. you have to use header() function to accomplish this.
<?php
header(“HTTP/1.0 404 Not Found”);
?>
Other necessary response code…

header("Location: /foo.php",TRUE,301);// 301 Moved Permanently
header("Location: /foo.php",TRUE,302);// 302 Found
header("Location: /foo.php");
header("Location: /foo.php",TRUE,303);// 303 See Other
header("Location: /foo.php",TRUE,307);// 307 Temporary Redirect

For more information on header function please keep you eye at http://us2.php.net/header

Anyway, let me expose to my original post..  I was talking on retriving response code.  It can be done by many ways including opening socket and using cURL.
I prefer to use cURL in this case as curl is faster than fsockopen.
Here is a function to retrieve http response header.

function get_http_header($url)
      {
          ob_start();
          $ch = curl_init($url);
          curl_setopt($ch, CURLOPT_HEADER, 1);
          curl_setopt($ch, CURLOPT_NOBODY, 1);
          $ok = curl_exec($ch);
          curl_close($ch);
          $head = ob_get_contents();
          ob_end_clean();
          return $head;
      }

Using this function, you will get all header information including cookies.
Look on the Sample Output of this function

HTTP/1.0 200 OK
Cache-Control: private, max-age=0
Date: Sun, 11 Jan 2009 06:34:42 GMT
Expires: -1
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=90215632c8490688:TM=1231655682:
LM=1231655682:S=aYh2YUY8dmUGmQh7;
expires=Tue, 11-Jan-2011 06:34:42 GMT; path=/; domain=.google.com.bd
Server: gws
Content-Length: 0
X-Cache: MISS from mail
Connection: close

Here we need only first line to get response code that is HTTP/1.0 200 OK
So, we can use $head=split(“\n”,$head);  to separate first line.
So, our final function will look like

function get_http_response_code($url)
      {
          ob_start();
          $ch = curl_init($url);
          curl_setopt($ch, CURLOPT_HEADER, 1);
          curl_setopt($ch, CURLOPT_NOBODY, 1);
          $ok = curl_exec($ch);
          curl_close($ch);
          $head = ob_get_contents();
          ob_end_clean();
          $head=split("\n",$head);
          $head=split(" ",$head[0]);
          return $head[1];
      }

What to Next?
I am showing you all http response code and meaning in a php array.

$response_status=array(    100=>"Continue",
            101=>"Switching Protocol",
            200=>"OK",
            201=>"Created",
            202=>"Accepted",
            203=>"Non-Authoritative Information",
            204=>"No Content",
            205=>"Reset Content",
            206=>"Partial Content",
            300=>"Multiple Choices",
            301=>"Moved Permanently",
            302=>"Found",
            303=>"See Other",
            304=>"Not Modified",
            305=>"Use Proxy",
            306=>"Switch Proxy",
            307=>"Temporary Redirect",
            400=>"Bad Request",
            401=>"Unauthorized",
            402=>"Payment Required",
            403=>"Forbidden",
            404=>"Not Found",
            405=>"Method Not Allowed",
            406=>"Not Acceptable",
            407=>"Proxy Authentication Required",
            408=>"Request Timeout",
            409=>"Conflict",
            410=>"Gone",
            411=>"Length Required",
            412=>"Precondition Failed",
            413=>"Request Entity Too Large",
            414=>"Request-URI Too Long",
            415=>"Unsupported Media Type",
            416=>"Requested Range Not Satisfiable",
            417=>"Expectation Failed",
            500=>"Internal Server Error",
            501=>"Not Implemented",
            502=>"Bad Gateway",
            503=>"Service Unavailable",
            504=>"Gateway Timeout",
            505=>"HTTP Version Not Supported",
            102=>"Processing",
            207=>"Multi-Status",
            418=>"I'm a Teapot",
            422=>"Unprocessable Entity",
            423=>"Locked",
            424=>"Failed Dependency",
            425=>"Unordered Collection",
            426=>"Upgrade Required",
            449=>"Retry With",
            450=>"Blocked",
            506=>"Variant Also Negotiates",
            507=>"Insufficient Storage",
            509=>"Bandwidth Limit Exceeded",
            510=>"Not Extended");

You can use this array along with above function.

Tags: , ,

You already might know that the giant company YAHOO provides some API to facilitate the application development process. One of them is Yahoo BBAuth API. I am glad to inform you that I wrote a wrapper class on Yahoo Browser Based Authentication (BBAuth) to make it easy and convenient.

So…, what’s BBAuth? What’s the point for using this class?

Well, a BBAuth API will provide you a WSSID and a cookie which will be destroyed after one hour (idle time) automatically (no way L ). After a successful login you will be able to access the users:

  • read and write to your data in Yahoo! Mail
  • read and write to your data in twlife
  • read your data in Yahoo! Address Book
  • read and write to your data in boss
  • read and write to your data in music
  • read and write to your data in twk

How it works:

The image below will illustrate the life cycle.

Yahoo BBauth

Yahoo BBauth

Now lemme tell you the entire process:

  1. Register your application
  2. Log in your users
  3. Use the user’s credentials to make web service calls

Wrapper Class  class.YahooAuth.php

Download from phpClasses.org


<?php
/* Description: Class for Yahoo BBAuth API
 * @author: Sadiqur Rahman
 * @param: $AppID=Yahoo BB Authentication Application ID
 * @param: $secret=Yahoo BB Authentication Secret key
 * @param: $AppData=Your application data which is an optional parameter
 * @Links:  http://developer.yahoo.com/auth/
 * @Author-URI: https://sadiqbd.wordpress.com
 * @Author-EMail: sadiqbd@gmail.com
 * License: GPL
 * Version: 1.0.0
 */
//declaring the class
class YahooAuth {

    protected $AppID;
    protected $secret;
    public $AppData;

    function __construct($AppID=NULL,$secret=NULL,$AppData=NULL){

        if (isset($AppID) && (!empty($AppID))){
            $this->AppID = $AppID;
        }else{
            global $YahooAppID;
            $this->AppID = $YahooAppID;
        }

        if (isset($secret) && (!empty($secret))){
            $this->AppID = $secret;
        }else{
            global $YahooSecret;
            $this->secret = $YahooSecret;
        }

        if (isset($AppData) && (!empty($AppData))){
            $this->AppData = $AppData;
        }

        if (!headers_sent()) {
            session_start();
        }

    }

    //Signature generation for Yahoo BBAuth
    protected function signature($path,$data,$ts){
        return md5($path.$data."&ts=".$ts.$this->secret);
    }

    //Generating login URL
    function generate_url(){
        $ts=time();
        $path="/WSLogin/V1/wslogin";
        $data="?appid=".$this->AppID."&appdata=".$this->AppData;
        $sig=$this->signature($path,$data,$ts);

        $url = "https://api.login.yahoo.com/WSLogin/V1/wslogin"
        ."?appid=".$this->AppID."&appdata=".$this->AppData."&ts=".$ts."&sig=".$sig;
        return $url;
    }

    //Automatically redirecting Yahoo login page
    function login(){

        if (!headers_sent()) {
            header('Location: '.$this->generate_url());
            exit;
            // If Header already sent, redirect to Yahoo using Javascript.
        } else {
            echo "<script type=\"text/javascript\">
                  <!--
                  window.location = \"".$this->generate_url()."\"
                  //-->
                  </script>".
                  "
<div align='center'>If you are not redirected within 5 Seconds <a " .
                  "href=\"".$this->generate_url()."\">Click Here</a>";
            exit;
        }
    }

    //Getting and verifying data from cookie and WSSID given by yahoo
    //and storing data into session for future use
    function get_credentials($token) {
        $ts=time();
        $path="/WSLogin/V1/wspwtoken_login";
        $data="?appid=".$this->AppID."&token=".$token;
        $sig=$this->signature($path,$data,$ts);

        $url = "https://api.login.yahoo.com/WSLogin/V1/wspwtoken_login"
        ."?appid=".$this->AppID."&token=".$token."&ts=".$ts."&sig=".$sig;

        $ch = curl_init();
        curl_setopt( $ch, CURLOPT_URL, $url );
        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
        $store = curl_exec( $ch );
        $xml = curl_exec( $ch );

        if (  preg_match( "/(Y=.*)/", $xml, $match_array ) == 1 ) {
            $COOKIE = $match_array[1];
        }
        if (  preg_match( "/<WSSID>(.+)<\/WSSID>/", $xml, $match_array ) == 1 ) {
            $WSSID = $match_array[1];
        }
        if (  preg_match( "/<Timeout>(.+)<\/Timeout>/", $xml, $match_array ) == 1 ) {
            $timeout = $match_array[1];
        }

        $_SESSION['valid_user']=true;
        $_SESSION['COOKIE'] = $COOKIE;
        $_SESSION['WSSID'] = $WSSID;
        $rv = array();
        $rv["COOKIE"] = $COOKIE;
        $rv["WSSID"] = $WSSID;
        $rv["timeout"]   = $timeout;
        return $rv;
    }

    //some magic methods for your convenience
    function __get($name){
        return $this->$name;
    }

    function __set($name,$value){
        $this->$name=$value;
    }

    function __toString(){
        return(var_export($this,TRUE));
    }

    function __destruct(){
        unset($this);
    }
}
?>

Example Usage  index.php


<?php

//implementing lazy loading
function __autoload($class){
    include_once("class.".$class.".php");
}

$YahooAppID=".lND7LnIkY5jBHPMGmMhBBkWWpbJ6_gew9XLo.B5.d8-"; //your AppID will be here
$YahooSecret="555060ec4069cf7f67ddb84339f8701c"; //your Secret key goes here

$obj= new YahooAuth(); //Instantiating the class

if (isset($_GET&#91;'token'&#93;) && isset($_GET&#91;'appid'&#93;)){
    $obj->get_credentials($_GET['token']);
}elseif(isset($_GET['logout'])){
    unset($_SESSION['valid_user']);
}

if ($_SESSION['valid_user']){
    echo "Congratulation! You are logged in.<br \>";
    echo "<a href='".$_SERVER&#91;'PHP_SELF'&#93;."?logout'>LogOut</a><br \>";
    echo "
<pre>";
    print_r($_SESSION);
    echo "</pre>
";
}else{
    echo "You are not logged in.<br \>";
    echo "<a href='".$obj->generate_url()."'>Click Here to logIn</a>";
}
?>

Download from phpclasses.org

My Qualification

My Classes on PHPClasses.org

August 2026
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Blog - Sadiqur Rahman

test

Design a site like this with WordPress.com
Get started